package 
{
    import com.RMP.*;
    import com.util.*;
    import flash.display.*;
    import flash.events.*;
    import flash.external.*;
    import flash.net.*;
    import flash.text.*;
    import flash.utils.*;
    import com.greensock.*;

    public class RMP extends MovieClip
    {
        public var tracer2:TextField;
        public var tracer3:TextField;
        public var menuShell:MenuShell;
        var yBorder:int;
        public var pathNames:Array;
        public var path:String = "http://www.richardmeier.com/";
        var unitsArray:Array;
        var containerShell:ContainerShell;
        var unitRatioH:Number;
        var unitRatioW:Number;
        public var menuArray:Array;
        var currXMLID:int;
        public var globalFiltersArray:Array;
        var toggleBtn:Sprite;
        public var localPagesXML:XML;
        public var filterList:XMLList;
        var field1:TextField;
        public var currNavId:int;
        public var overBackBtn:Boolean = false;
        public var header:Header;
        var unitCols:int;
        var gutterRatioH:Number;
        public var myBookmarksID:String;
        public var gutterW:Number;
        public var gutterH:Number;
        var homeShell:HomeShell;
        var gutterRatioW:Number;
        public var gridCurrH:Number;
        public var sharedLb:SharedObject;
        public var gridCurrW:Number;
        var xBorder:int;
        public var searchTerms:String = "";
        public var myXML:XML;
        public var overFullscreenIcon:Boolean = false;
        public var bookmarksXML:XML;
        public var coldColor:String = "0x777777";
        public var overColor:String = "0x000000";
        public var pathNamesClone:Array;
        var xmlLoader:XMLLoader;
        public var projFiltersArray:Array;
        var loaderbar:LoaderBar;
        public var hotColor:String = "0xff3300";
        var fadeSpeed:Number = 0.5;
        public var coldColorHTML:String = "#777777";
        var introShell:IntroShell;
        public var menuArrayTemp:Array;
        var fileReference:FileReference;
        var globalIcons:GlobalIcons;
        public var unitH:Number;
        public var unitW:Number;
        public var localImagesXML:XML;
        var fieldShell:Sprite;
        public var headerH:Number;
        public var headerW:Number;
        public var clickPathNames:Array;
        var unitRows:int;
        public var unit:Unit;
        var fieldFormat:TextFormat;
        public var currBookmark:String = "page";
        var bookmarksXMLLoader:URLLoader;
        var firstTime:Boolean = false;
        public var hotColorHTML:String = "#ff3300";
        public var gridH:Number;
        public var gridMaxH:Number;
        public var tracer:TextField;
        public var gridW:Number;
        public var gridX:Number;
        public var gridY:Number;
        public var gridMaxW:Number;
        public var toolTip:ToolTip;
        var backBtn:BackBtn;

        public function RMP()
        {
            path = "http://www.richardmeier.com/";
            firstTime = false;
            pathNames = new Array();
            clickPathNames = new Array();
            pathNamesClone = new Array();
            fadeSpeed = 0.5;
            hotColor = "0xff3300";
            hotColorHTML = "#ff3300";
            overColor = "0x000000";
            coldColor = "0x777777";
            coldColorHTML = "#777777";
            globalFiltersArray = new Array("Filter", "Off", "Sketches", "Drawings", "Models", "Renderings", "Construction", "Photography", "Video");
            searchTerms = "";
            sharedLb = SharedObject.getLocal("rmpBookmark");
            currBookmark = "page";
            overFullscreenIcon = false;
            overBackBtn = false;
            filterList = new XMLList("<myFilter title=\"Off\" id=\"\"/>");
            fileReference = new FileReference();
            stage.scaleMode = StageScaleMode.NO_SCALE;
            stage.align = StageAlign.TOP_LEFT;
            stage.frameRate = 31;
            focusRect = false;
            gridMaxW = 999;
            gridMaxH = 774;
            xBorder = 20;
            yBorder = 20;
            unitRows = 6;
            unitCols = 12;
            unitRatioW = 0.075;
            unitRatioH = 0.151;
            gutterRatioW = 0.099;
            gutterRatioH = 0.058;
            projFiltersArray = new Array("Off");
            toolTip = new ToolTip(this, fadeSpeed);
            toolTip.buttonMode = false;
            toolTip.mouseChildren = false;
            toolTip.mouseEnabled = false;
            toolTip.visible = false;
            toolTip.alpha = 0;
            buildGrid();
            toggleBtn = new Sprite();
            toggleBtn.useHandCursor = true;
            toggleBtn.mouseEnabled = true;
            toggleBtn.buttonMode = true;
            toggleBtn.graphics.beginFill(16777215, 1);
            toggleBtn.graphics.drawRect(0, 0, 10, 10);
            toggleBtn.graphics.endFill();
            toggleBtn.addEventListener(MouseEvent.CLICK, toggleGrid, false, 0, true);
            stage.addEventListener(Event.RESIZE, onResizer, false, 0, true);
            doResize();
            getCurrBookmarkID();
            getCurrXMLID();
            return;
        }

        function dragToolTip(event:Event) : void
        {
            if (overFullscreenIcon == true)
            {
                toolTip.x = Math.round(stage.stageWidth - toolTip.width - 10);
                toolTip.y = Math.round(mouseY + 15);
            }
            else if (overBackBtn == true)
            {
                toolTip.x = Math.round(10);
                toolTip.y = Math.round(mouseY + 15);
            }
            else
            {
                toolTip.x = Math.round(mouseX - toolTip.width / 2);
                toolTip.y = Math.round(mouseY - toolTip.height - 10);
            }
            return;
        }

        function homeFade()
        {
            menuShell.fadeInShell();
            TweenMax.to(containerShell, fadeSpeed, {alpha:1, overwrite:true});
            return;
        }

        function resizeGrid() : void
        {
            var _loc_1:* = undefined;
            var _loc_2:int = 0;
            var _loc_3:int = 0;
            gridW = Math.round(stage.stageWidth - 2 * xBorder);
            if (gridW >= gridMaxW)
            {
                gridW = gridMaxW;
            }
            gridH = Math.round(gridMaxH * (gridW / gridMaxW));
            if (gridH <= 550)
            {
                gridH = 550;
            }
            gridW = Math.round(gridMaxW * (gridH / gridMaxH));
            if (gridW >= Math.round(stage.stageWidth - 2 * xBorder))
            {
                gridW = Math.round(stage.stageWidth - 2 * xBorder);
                gridH = Math.round(gridMaxH * (gridW / gridMaxW));
            }
            if (gridH >= Math.round(stage.stageHeight - 2 * yBorder - 20))
            {
                gridH = Math.round(stage.stageHeight - 1 * yBorder);
                if (gridH >= gridMaxH)
                {
                    gridH = gridMaxH;
                }
                if (gridH <= 550)
                {
                    gridH = 550;
                }
                gridW = Math.round(gridMaxW * (gridH / gridMaxH));
                if (gridW >= Math.round(stage.stageWidth - 2 * xBorder))
                {
                    gridW = Math.round(stage.stageWidth - 2 * xBorder);
                    gridH = Math.round(gridMaxH * (gridW / gridMaxW));
                }
                gridX = Math.round((stage.stageWidth - gridW) / 2);
                gridY = Math.round(0);
            }
            else
            {
                gridX = Math.round((stage.stageWidth - gridW) / 2);
                gridY = Math.round((stage.stageHeight - gridH) / 2);
            }
            unitW = Math.round(unitRatioW * gridW);
            unitH = Math.round(unitRatioH * gridH);
            gutterW = gridW * gutterRatioW / 11;
            gutterH = gridH * gutterRatioH / 5;
            headerW = Math.round(12 * unitW + 11 * gutterW);
            headerH = Math.round(gutterH * 3);
            gridCurrW = Math.round(12 * unitW + 11 * gutterW);
            gridCurrH = Math.round(6 * unitH + 5 * gutterH + headerH);
            _loc_1 = 0;
            _loc_2 = 0;
            while (_loc_2 < unitRows)
            {
                
                _loc_3 = 0;
                while (_loc_3 < unitCols)
                {
                    
                    unitsArray[_loc_1].width = unitW;
                    unitsArray[_loc_1].height = unitH;
                    unitsArray[_loc_1].x = Math.round(gridX + _loc_3 * (unitW + gutterW));
                    unitsArray[_loc_1].y = Math.round(gridY + headerH + _loc_2 * (unitH + gutterH));
                    _loc_1 = _loc_1 + 1;
                    _loc_3++;
                }
                _loc_2++;
            }
            return;
        }

        public function showToolTip() : void
        {
            addChild(toolTip);
            toolTip.visible = true;
            TweenMax.to(toolTip, fadeSpeed, {alpha:1, delay:1, overwrite:true});
            stage.addEventListener(Event.ENTER_FRAME, dragToolTip);
            return;
        }

        public function clearBookmarks() : void
        {
            var _loc_1:String = null;
            var _loc_2:URLRequest = null;
            var _loc_3:URLLoader = null;
            _loc_1 = path + "lightbox_support/clearLightbox.php?lightbox_id=" + myBookmarksID;
            _loc_2 = new URLRequest(_loc_1);
            _loc_2.method = URLRequestMethod.POST;
            _loc_3 = new URLLoader();
            _loc_3.dataFormat = URLLoaderDataFormat.TEXT;
            _loc_3.addEventListener(Event.COMPLETE, clearComplete);
            _loc_3.addEventListener(IOErrorEvent.IO_ERROR, sendIOError);
            _loc_3.load(_loc_2);
            return;
        }

        function initBookmarksXML(event:Event) : void
        {
            var _loc_2:int = 0;
            var _loc_3:int = 0;
            var _loc_4:* = undefined;
            var _loc_5:* = undefined;
            bookmarksXML = XML(bookmarksXMLLoader.data);
            localImagesXML = <images></images>;
            _loc_2 = 0;
            while (_loc_2 < bookmarksXML.images.item.length())
            {
                
                _loc_4 = bookmarksXML.images.item[_loc_2];
                localImagesXML.images = localImagesXML.images + <image/>;
                localImagesXML.image[_loc_2].@id = _loc_4.@id;
                localImagesXML.image[_loc_2].@parentId = _loc_4.@parentId;
                _loc_2++;
            }
            localPagesXML = <pages></pages>;
            _loc_3 = 0;
            while (_loc_3 < bookmarksXML.bookmarks.item.length())
            {
                
                _loc_5 = bookmarksXML.bookmarks.item[_loc_3];
                localPagesXML.pages = localPagesXML.pages + <page/>;
                localPagesXML.page[_loc_3].@id = _loc_5.@id;
                _loc_3++;
            }
            return;
        }

        public function hideToolTip() : void
        {
            overFullscreenIcon = false;
            overBackBtn = false;
            TweenMax.to(toolTip, fadeSpeed / 2, {alpha:0, overwrite:true, onComplete:function ()
            {
                toolTip.visible = false;
                stage.removeEventListener(Event.ENTER_FRAME, dragToolTip);
                return;
            }
            });
            return;
        }

        public function browserBack() : void
        {
            SWFAddress.back();
            return;
        }

        function gridOff() : void
        {
            var _loc_1:int = 0;
            _loc_1 = 0;
            while (_loc_1 < unitsArray.length)
            {
                
                unitsArray[_loc_1].alpha = 0;
                _loc_1++;
            }
            return;
        }

        function initSWFAddress()
        {
            removeChild(loaderbar);
            loaderbar = null;
            SWFAddress.addEventListener(SWFAddressEvent.CHANGE, handleSWFAddressChange, false, 0, true);
            return;
        }

        function toUppercaseWithCaps(param1:String) : String
        {
            var _loc_2:String = null;
            var _loc_3:int = 0;
            _loc_2 = "";
            _loc_3 = 0;
            if (param1.charAt(param1.length - 2) == "-")
            {
                _loc_3 = 0;
                while (_loc_3 < param1.length)
                {
                    
                    if (_loc_3 == param1.length - 3)
                    {
                        _loc_2 = _loc_2 + param1.charAt(_loc_3).toUpperCase();
                    }
                    else if (_loc_3 == param1.length - 2)
                    {
                        _loc_2 = _loc_2 + "-";
                    }
                    else if (_loc_3 == (param1.length - 1))
                    {
                        _loc_2 = _loc_2 + param1.charAt(_loc_3).toUpperCase();
                    }
                    else if (param1.charAt(_loc_3) == "-")
                    {
                        _loc_2 = _loc_2 + " ";
                    }
                    else if (_loc_3 == 0 || param1.charAt((_loc_3 - 1)) == "-")
                    {
                        _loc_2 = _loc_2 + param1.charAt(_loc_3).toUpperCase();
                    }
                    else
                    {
                        _loc_2 = _loc_2 + param1.charAt(_loc_3).toLowerCase();
                    }
                    _loc_3++;
                }
            }
            else
            {
                _loc_3 = 0;
                while (_loc_3 < param1.length)
                {
                    
                    if (param1.charAt(_loc_3) == "-")
                    {
                        _loc_2 = _loc_2 + " ";
                    }
                    else if (_loc_3 == 0 || param1.charAt((_loc_3 - 1)) == "-")
                    {
                        _loc_2 = _loc_2 + param1.charAt(_loc_3).toUpperCase();
                    }
                    else
                    {
                        _loc_2 = _loc_2 + param1.charAt(_loc_3).toLowerCase();
                    }
                    _loc_3++;
                }
            }
            return _loc_2;
        }

        public function registerPageHit(param1:String)
        {
            ExternalInterface.call("pageTracker._trackPageview", "/wwww/" + param1);
            return;
        }

        public function browserForward() : void
        {
            SWFAddress.forward();
            return;
        }

        public function resetNavCount()
        {
            menuShell.navArray[4][1].updateField("Bookmarks");
            return;
        }

        private function pushSWFAddressChange() : void
        {
            var arraysEqual:Boolean;
            var tempXMLList:XMLList;
            if (firstTime == false)
            {
                if (pathNames[0] == "" || pathNames[0] == " " || pathNames[0] == undefined)
                {
                    introShell = new IntroShell(this, fadeSpeed);
                    introShell.addEventListener(FadeOutEvent.FADEOUT_COMPLETE, siteInit, false, 0, true);
                    addChild(introShell);
                    introShell.myXMLList = myXML.home.slides;
                    introShell.buildSlideshow();
                    introShell.fadeInBtns();
                }
                else
                {
                    menuShell = new MenuShell(this, fadeSpeed, false);
                    menuShell.alpha = 0;
                    addChild(menuShell);
                    menuArray = new Array();
                    doResize();
                    menuShell.blendMode = BlendMode.LAYER;
                    containerShell = new ContainerShell(this, fadeSpeed);
                    containerShell.alpha = 0;
                    addChild(containerShell);
                    setTimeout(homeFade, 200);
                    globalIcons = new GlobalIcons(this, fadeSpeed);
                    globalIcons.alpha = 0;
                    addChild(globalIcons);
                    doResize();
                    TweenMax.to(globalIcons, fadeSpeed, {alpha:1, overwrite:true});
                    backBtn = new BackBtn(this, fadeSpeed);
                    backBtn.buttonMode = true;
                    backBtn.mouseChildren = true;
                    backBtn.x = 10;
                    backBtn.y = 9;
                    backBtn.visible = false;
                    addChild(backBtn);
                    doResize();
                }
            }
            arraysEqual;
            if (arraysEqual == false)
            {
                if (pathNames[0] == "projects")
                {
                    menuShell.autoSwitch(0);
                }
                else if (pathNames[0] == "practice")
                {
                    menuShell.autoSwitch(1);
                }
                else if (pathNames[0] == "contact")
                {
                    menuShell.autoSwitch(2);
                }
                else if (pathNames[0] == "news")
                {
                    tracer.text = "autoSwitch news";
                    menuShell.autoSwitch(3);
                }
                else if (pathNames[0] == "bookmarks")
                {
                    menuShell.autoSwitch(4);
                }
                else if (pathNames[0] == "search")
                {
                    menuShell.autoSwitch(5);
                }
            }
            clickPathNames = [];
            switch(pathNames[0])
            {
                case "projects":
                {
                    turnOffHomeShell();
                    switch(pathNames[1])
                    {
                        case "architecture":
                        {
                            menuShell.hRule1On();
                            switch(pathNames[2])
                            {
                                case "visual":
                                {
                                    if (pathNames[4] != undefined)
                                    {
                                        menuShell.hRule1On();
                                        if (pathNames[5] == "sub")
                                        {
                                            if (comparePathNames(5) == true)
                                            {
                                                if (pathNames[7] != undefined)
                                                {
                                                    containerShell.updateProjectSubNav(pathNames[6], pathNames[7]);
                                                }
                                                else if (pathNames[6] != undefined)
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(pathNames[6], 0);
                                                }
                                                else
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(0, 0);
                                                }
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                if (pathNames[7] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, pathNames[6], pathNames[7]);
                                                }
                                                else if (pathNames[6] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, pathNames[6], 0);
                                                }
                                                else
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, 0, 0);
                                                }
                                            }
                                        }
                                        else if (pathNames[5] != undefined)
                                        {
                                            if (comparePathNames(5) == true)
                                            {
                                                containerShell.updateProjectNav(pathNames[5]);
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                containerShell.newProject(pathNames[4], pathNames[5]);
                                            }
                                        }
                                        else
                                        {
                                            containerShell.newProject(pathNames[4], 0);
                                        }
                                    }
                                    else if (pathNames[3] != undefined)
                                    {
                                        pathNamesClone = [];
                                        var _loc_3:int = 0;
                                        var _loc_6:int = 0;
                                        var _loc_7:* = myXML.nav.projects.tier0;
                                        var _loc_5:* = new XMLList("");
                                        for each (_loc_8 in _loc_7)
                                        {
                                            
                                            var _loc_9:* = _loc_7[_loc_6];
                                            with (_loc_7[_loc_6])
                                            {
                                                if (@label == "Architecture")
                                                {
                                                    _loc_5[_loc_6] = _loc_8;
                                                }
                                            }
                                        }
                                        var _loc_4:* = _loc_5.tier1;
                                        var _loc_2:* = new XMLList("");
                                        for each (_loc_5 in _loc_4)
                                        {
                                            
                                            var _loc_6:* = _loc_4[_loc_3];
                                            with (_loc_4[_loc_3])
                                            {
                                                if (@label == "Visual")
                                                {
                                                    _loc_2[_loc_3] = _loc_5;
                                                }
                                            }
                                        }
                                        containerShell.newShell("visualShell", _loc_2, pathNames[3]);
                                    }
                                    break;
                                }
                                case "icons":
                                {
                                    if (pathNames[4] != undefined)
                                    {
                                        menuShell.hRule1On();
                                        if (pathNames[5] == "sub")
                                        {
                                            if (comparePathNames(5) == true)
                                            {
                                                if (pathNames[7] != undefined)
                                                {
                                                    containerShell.updateProjectSubNav(pathNames[6], pathNames[7]);
                                                }
                                                else if (pathNames[6] != undefined)
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(pathNames[6], 0);
                                                }
                                                else
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(0, 0);
                                                }
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                if (pathNames[7] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, pathNames[6], pathNames[7]);
                                                }
                                                else if (pathNames[6] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, pathNames[6], 0);
                                                }
                                                else
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, 0, 0);
                                                }
                                            }
                                        }
                                        else if (pathNames[5] != undefined)
                                        {
                                            if (comparePathNames(5) == true)
                                            {
                                                containerShell.updateProjectNav(pathNames[5]);
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                containerShell.newProject(pathNames[4], pathNames[5]);
                                            }
                                        }
                                        else
                                        {
                                            containerShell.newProject(pathNames[4], 0);
                                        }
                                    }
                                    else if (pathNames[3] != undefined)
                                    {
                                        pathNamesClone = [];
                                        var _loc_3:int = 0;
                                        var _loc_6:int = 0;
                                        var _loc_7:* = myXML.nav.projects.tier0;
                                        var _loc_5:* = new XMLList("");
                                        for each (_loc_8 in _loc_7)
                                        {
                                            
                                            var _loc_9:* = _loc_7[_loc_6];
                                            with (_loc_7[_loc_6])
                                            {
                                                if (@label == "Architecture")
                                                {
                                                    _loc_5[_loc_6] = _loc_8;
                                                }
                                            }
                                        }
                                        var _loc_4:* = _loc_5.tier1;
                                        var _loc_2:* = new XMLList("");
                                        for each (_loc_5 in _loc_4)
                                        {
                                            
                                            var _loc_6:* = _loc_4[_loc_3];
                                            with (_loc_4[_loc_3])
                                            {
                                                if (@label == "Icons")
                                                {
                                                    _loc_2[_loc_3] = _loc_5;
                                                }
                                            }
                                        }
                                        containerShell.newShell("projectIconShell", _loc_2, pathNames[3]);
                                    }
                                    break;
                                }
                                case "name":
                                {
                                    if (pathNames[4] != undefined)
                                    {
                                        menuShell.hRule1On();
                                        if (pathNames[5] == "sub")
                                        {
                                            if (comparePathNames(5) == true)
                                            {
                                                if (pathNames[7] != undefined)
                                                {
                                                    containerShell.updateProjectSubNav(pathNames[6], pathNames[7]);
                                                }
                                                else if (pathNames[6] != undefined)
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(pathNames[6], 0);
                                                }
                                                else
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(0, 0);
                                                }
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                if (pathNames[7] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, pathNames[6], pathNames[7]);
                                                }
                                                else if (pathNames[6] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, pathNames[6], 0);
                                                }
                                                else
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, 0, 0);
                                                }
                                            }
                                        }
                                        else if (pathNames[5] != undefined)
                                        {
                                            if (comparePathNames(5) == true)
                                            {
                                                containerShell.updateProjectNav(pathNames[5]);
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                containerShell.newProject(pathNames[4], pathNames[5]);
                                            }
                                        }
                                        else
                                        {
                                            containerShell.newProject(pathNames[4], 0);
                                        }
                                    }
                                    else if (pathNames[3] != undefined)
                                    {
                                        pathNamesClone = [];
                                        var _loc_3:int = 0;
                                        var _loc_6:int = 0;
                                        var _loc_7:* = myXML.nav.projects.tier0;
                                        var _loc_5:* = new XMLList("");
                                        for each (_loc_8 in _loc_7)
                                        {
                                            
                                            var _loc_9:* = _loc_7[_loc_6];
                                            with (_loc_7[_loc_6])
                                            {
                                                if (@label == "Architecture")
                                                {
                                                    _loc_5[_loc_6] = _loc_8;
                                                }
                                            }
                                        }
                                        var _loc_4:* = _loc_5.tier1;
                                        var _loc_2:* = new XMLList("");
                                        for each (_loc_5 in _loc_4)
                                        {
                                            
                                            var _loc_6:* = _loc_4[_loc_3];
                                            with (_loc_4[_loc_3])
                                            {
                                                if (@label == "Name")
                                                {
                                                    _loc_2[_loc_3] = _loc_5;
                                                }
                                            }
                                        }
                                        containerShell.newShell("nameShell", _loc_2.tier2, pathNames[3]);
                                    }
                                    break;
                                }
                                case "type":
                                {
                                    if (pathNames[3] != undefined)
                                    {
                                        if (pathNames[5] != undefined)
                                        {
                                            if (pathNames[6] == "sub")
                                            {
                                                if (comparePathNames(6) == true)
                                                {
                                                    if (pathNames[8] != undefined)
                                                    {
                                                        containerShell.updateProjectSubNav(pathNames[7], pathNames[8]);
                                                    }
                                                    else if (pathNames[7] != undefined)
                                                    {
                                                        clonePathNames();
                                                        containerShell.updateProjectSubNav(pathNames[7], 0);
                                                    }
                                                    else
                                                    {
                                                        clonePathNames();
                                                        containerShell.updateProjectSubNav(0, 0);
                                                    }
                                                }
                                                else
                                                {
                                                    clonePathNames();
                                                    if (pathNames[7] != undefined)
                                                    {
                                                        containerShell.newSubProject(pathNames[5], 6, pathNames[7], pathNames[8]);
                                                    }
                                                    else if (pathNames[6] != undefined)
                                                    {
                                                        containerShell.newSubProject(pathNames[5], 6, pathNames[7], 0);
                                                    }
                                                    else
                                                    {
                                                        containerShell.newSubProject(pathNames[5], 6, 0, 0);
                                                    }
                                                }
                                            }
                                            else if (pathNames[6] != undefined)
                                            {
                                                if (comparePathNames(6) == true)
                                                {
                                                    containerShell.updateProjectNav(pathNames[6]);
                                                }
                                                else
                                                {
                                                    clonePathNames();
                                                    containerShell.newProject(pathNames[5], pathNames[6]);
                                                }
                                            }
                                            else
                                            {
                                                containerShell.newProject(pathNames[5], 0);
                                            }
                                        }
                                        else
                                        {
                                            pathNamesClone = [];
                                            if (pathNames[3] == "icons")
                                            {
                                                var _loc_3:int = 0;
                                                var _loc_6:int = 0;
                                                var _loc_9:int = 0;
                                                var _loc_10:* = myXML.nav.projects.tier0;
                                                var _loc_8:* = new XMLList("");
                                                for each (_loc_11 in _loc_10)
                                                {
                                                    
                                                    var _loc_12:* = _loc_10[_loc_9];
                                                    with (_loc_10[_loc_9])
                                                    {
                                                        if (@label == "Architecture")
                                                        {
                                                            _loc_8[_loc_9] = _loc_11;
                                                        }
                                                    }
                                                }
                                                var _loc_7:* = _loc_8.tier1;
                                                var _loc_5:* = new XMLList("");
                                                for each (_loc_8 in _loc_7)
                                                {
                                                    
                                                    var _loc_9:* = _loc_7[_loc_6];
                                                    with (_loc_7[_loc_6])
                                                    {
                                                        if (@label == "Type")
                                                        {
                                                            _loc_5[_loc_6] = _loc_8;
                                                        }
                                                    }
                                                }
                                                var _loc_4:* = _loc_5.tier2;
                                                var _loc_2:* = new XMLList("");
                                                for each (_loc_5 in _loc_4)
                                                {
                                                    
                                                    var _loc_6:* = _loc_4[_loc_3];
                                                    with (_loc_4[_loc_3])
                                                    {
                                                        if (@label == "Icons")
                                                        {
                                                            _loc_2[_loc_3] = _loc_5;
                                                        }
                                                    }
                                                }
                                                containerShell.newShell("iconShell", _loc_2, pathNames[4]);
                                            }
                                            else
                                            {
                                                var _loc_3:int = 0;
                                                var _loc_6:int = 0;
                                                var _loc_9:int = 0;
                                                var _loc_10:* = myXML.nav.projects.tier0;
                                                var _loc_8:* = new XMLList("");
                                                for each (_loc_11 in _loc_10)
                                                {
                                                    
                                                    var _loc_12:* = _loc_10[_loc_9];
                                                    with (_loc_10[_loc_9])
                                                    {
                                                        if (@label == "Architecture")
                                                        {
                                                            _loc_8[_loc_9] = _loc_11;
                                                        }
                                                    }
                                                }
                                                var _loc_7:* = _loc_8.tier1;
                                                var _loc_5:* = new XMLList("");
                                                for each (_loc_8 in _loc_7)
                                                {
                                                    
                                                    var _loc_9:* = _loc_7[_loc_6];
                                                    with (_loc_7[_loc_6])
                                                    {
                                                        if (@label == "Type")
                                                        {
                                                            _loc_5[_loc_6] = _loc_8;
                                                        }
                                                    }
                                                }
                                                var _loc_4:* = _loc_5.tier2;
                                                var _loc_2:* = new XMLList("");
                                                for each (_loc_5 in _loc_4)
                                                {
                                                    
                                                    var _loc_6:* = _loc_4[_loc_3];
                                                    with (_loc_4[_loc_3])
                                                    {
                                                        if (@label == toUppercase(pathNames[3]))
                                                        {
                                                            _loc_2[_loc_3] = _loc_5;
                                                        }
                                                    }
                                                }
                                                containerShell.newShell("typeShell", _loc_2, pathNames[4]);
                                            }
                                        }
                                    }
                                    break;
                                }
                                case "date":
                                {
                                    if (pathNames[5] != undefined)
                                    {
                                        if (pathNames[6] == "sub")
                                        {
                                            if (comparePathNames(6) == true)
                                            {
                                                if (pathNames[8] != undefined)
                                                {
                                                    containerShell.updateProjectSubNav(pathNames[7], pathNames[8]);
                                                }
                                                else if (pathNames[7] != undefined)
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(pathNames[7], 0);
                                                }
                                                else
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(0, 0);
                                                }
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                if (pathNames[8] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[5], 6, pathNames[7], pathNames[8]);
                                                }
                                                else if (pathNames[7] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[5], 6, pathNames[7], 0);
                                                }
                                                else
                                                {
                                                    containerShell.newSubProject(pathNames[5], 6, 0, 0);
                                                }
                                            }
                                        }
                                        else if (pathNames[6] != undefined)
                                        {
                                            if (comparePathNames(6) == true)
                                            {
                                                containerShell.updateProjectNav(pathNames[6]);
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                containerShell.newProject(pathNames[5], pathNames[6]);
                                            }
                                        }
                                        else
                                        {
                                            containerShell.newProject(pathNames[5], 0);
                                        }
                                    }
                                    else
                                    {
                                        pathNamesClone = [];
                                        if (pathNames[3] != undefined)
                                        {
                                            switch(pathNames[3])
                                            {
                                                case "start-date":
                                                {
                                                    var _loc_3:int = 0;
                                                    var _loc_6:int = 0;
                                                    var _loc_9:int = 0;
                                                    var _loc_10:* = myXML.nav.projects.tier0;
                                                    var _loc_8:* = new XMLList("");
                                                    for each (_loc_11 in _loc_10)
                                                    {
                                                        
                                                        var _loc_12:* = _loc_10[_loc_9];
                                                        with (_loc_10[_loc_9])
                                                        {
                                                            if (@label == "Architecture")
                                                            {
                                                                _loc_8[_loc_9] = _loc_11;
                                                            }
                                                        }
                                                    }
                                                    var _loc_7:* = _loc_8.tier1;
                                                    var _loc_5:* = new XMLList("");
                                                    for each (_loc_8 in _loc_7)
                                                    {
                                                        
                                                        var _loc_9:* = _loc_7[_loc_6];
                                                        with (_loc_7[_loc_6])
                                                        {
                                                            if (@label == "Date")
                                                            {
                                                                _loc_5[_loc_6] = _loc_8;
                                                            }
                                                        }
                                                    }
                                                    var _loc_4:* = _loc_5.tier2;
                                                    var _loc_2:* = new XMLList("");
                                                    for each (_loc_5 in _loc_4)
                                                    {
                                                        
                                                        var _loc_6:* = _loc_4[_loc_3];
                                                        with (_loc_4[_loc_3])
                                                        {
                                                            if (@label == "Start Date")
                                                            {
                                                                _loc_2[_loc_3] = _loc_5;
                                                            }
                                                        }
                                                    }
                                                    containerShell.newShell("dateShell", _loc_2.tier3, pathNames[4]);
                                                    break;
                                                }
                                                case "end-date":
                                                {
                                                    var _loc_3:int = 0;
                                                    var _loc_6:int = 0;
                                                    var _loc_9:int = 0;
                                                    var _loc_10:* = myXML.nav.projects.tier0;
                                                    var _loc_8:* = new XMLList("");
                                                    for each (_loc_11 in _loc_10)
                                                    {
                                                        
                                                        var _loc_12:* = _loc_10[_loc_9];
                                                        with (_loc_10[_loc_9])
                                                        {
                                                            if (@label == "Architecture")
                                                            {
                                                                _loc_8[_loc_9] = _loc_11;
                                                            }
                                                        }
                                                    }
                                                    var _loc_7:* = _loc_8.tier1;
                                                    var _loc_5:* = new XMLList("");
                                                    for each (_loc_8 in _loc_7)
                                                    {
                                                        
                                                        var _loc_9:* = _loc_7[_loc_6];
                                                        with (_loc_7[_loc_6])
                                                        {
                                                            if (@label == "Date")
                                                            {
                                                                _loc_5[_loc_6] = _loc_8;
                                                            }
                                                        }
                                                    }
                                                    var _loc_4:* = _loc_5.tier2;
                                                    var _loc_2:* = new XMLList("");
                                                    for each (_loc_5 in _loc_4)
                                                    {
                                                        
                                                        var _loc_6:* = _loc_4[_loc_3];
                                                        with (_loc_4[_loc_3])
                                                        {
                                                            if (@label == "End Date")
                                                            {
                                                                _loc_2[_loc_3] = _loc_5;
                                                            }
                                                        }
                                                    }
                                                    containerShell.newShell("dateShell", _loc_2.tier3, pathNames[4]);
                                                    break;
                                                }
                                                case "current":
                                                {
                                                    var _loc_3:int = 0;
                                                    var _loc_6:int = 0;
                                                    var _loc_9:int = 0;
                                                    var _loc_10:* = myXML.nav.projects.tier0;
                                                    var _loc_8:* = new XMLList("");
                                                    for each (_loc_11 in _loc_10)
                                                    {
                                                        
                                                        var _loc_12:* = _loc_10[_loc_9];
                                                        with (_loc_10[_loc_9])
                                                        {
                                                            if (@label == "Architecture")
                                                            {
                                                                _loc_8[_loc_9] = _loc_11;
                                                            }
                                                        }
                                                    }
                                                    var _loc_7:* = _loc_8.tier1;
                                                    var _loc_5:* = new XMLList("");
                                                    for each (_loc_8 in _loc_7)
                                                    {
                                                        
                                                        var _loc_9:* = _loc_7[_loc_6];
                                                        with (_loc_7[_loc_6])
                                                        {
                                                            if (@label == "Date")
                                                            {
                                                                _loc_5[_loc_6] = _loc_8;
                                                            }
                                                        }
                                                    }
                                                    var _loc_4:* = _loc_5.tier2;
                                                    var _loc_2:* = new XMLList("");
                                                    for each (_loc_5 in _loc_4)
                                                    {
                                                        
                                                        var _loc_6:* = _loc_4[_loc_3];
                                                        with (_loc_4[_loc_3])
                                                        {
                                                            if (@label == "Current")
                                                            {
                                                                _loc_2[_loc_3] = _loc_5;
                                                            }
                                                        }
                                                    }
                                                    containerShell.newShell("typeShell", _loc_2, pathNames[4]);
                                                    break;
                                                }
                                                case "unbuilt":
                                                {
                                                    var _loc_3:int = 0;
                                                    var _loc_6:int = 0;
                                                    var _loc_9:int = 0;
                                                    var _loc_10:* = myXML.nav.projects.tier0;
                                                    var _loc_8:* = new XMLList("");
                                                    for each (_loc_11 in _loc_10)
                                                    {
                                                        
                                                        var _loc_12:* = _loc_10[_loc_9];
                                                        with (_loc_10[_loc_9])
                                                        {
                                                            if (@label == "Architecture")
                                                            {
                                                                _loc_8[_loc_9] = _loc_11;
                                                            }
                                                        }
                                                    }
                                                    var _loc_7:* = _loc_8.tier1;
                                                    var _loc_5:* = new XMLList("");
                                                    for each (_loc_8 in _loc_7)
                                                    {
                                                        
                                                        var _loc_9:* = _loc_7[_loc_6];
                                                        with (_loc_7[_loc_6])
                                                        {
                                                            if (@label == "Date")
                                                            {
                                                                _loc_5[_loc_6] = _loc_8;
                                                            }
                                                        }
                                                    }
                                                    var _loc_4:* = _loc_5.tier2;
                                                    var _loc_2:* = new XMLList("");
                                                    for each (_loc_5 in _loc_4)
                                                    {
                                                        
                                                        var _loc_6:* = _loc_4[_loc_3];
                                                        with (_loc_4[_loc_3])
                                                        {
                                                            if (@label == "Unbuilt")
                                                            {
                                                                _loc_2[_loc_3] = _loc_5;
                                                            }
                                                        }
                                                    }
                                                    containerShell.newShell("typeShell", _loc_2, pathNames[4]);
                                                    break;
                                                }
                                                default:
                                                {
                                                    break;
                                                }
                                            }
                                        }
                                    }
                                    break;
                                }
                                case "location":
                                {
                                    if (pathNames[6] != undefined)
                                    {
                                        if (pathNames[7] == "sub")
                                        {
                                            if (comparePathNames(7) == true)
                                            {
                                                if (pathNames[9] != undefined)
                                                {
                                                    containerShell.updateProjectSubNav(pathNames[8], pathNames[9]);
                                                }
                                                else if (pathNames[8] != undefined)
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(pathNames[8], 0);
                                                }
                                                else
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(0, 0);
                                                }
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                if (pathNames[9] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[6], 7, pathNames[8], pathNames[8]);
                                                }
                                                else if (pathNames[6] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[6], 7, pathNames[8], 0);
                                                }
                                                else
                                                {
                                                    containerShell.newSubProject(pathNames[6], 7, 0, 0);
                                                }
                                            }
                                        }
                                        else if (pathNames[7] != undefined)
                                        {
                                            if (comparePathNames(7) == true)
                                            {
                                                containerShell.updateProjectNav(pathNames[7]);
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                containerShell.newProject(pathNames[6], pathNames[7]);
                                            }
                                        }
                                        else
                                        {
                                            clonePathNames();
                                            containerShell.newProject(pathNames[6], 0);
                                        }
                                    }
                                    else if (pathNames[3] != undefined)
                                    {
                                        pathNamesClone = [];
                                        var _loc_3:int = 0;
                                        var _loc_6:int = 0;
                                        var _loc_9:int = 0;
                                        var _loc_12:int = 0;
                                        var _loc_13:* = myXML.nav.projects.tier0;
                                        var _loc_11:* = new XMLList("");
                                        for each (_loc_14 in _loc_13)
                                        {
                                            
                                            var _loc_15:* = _loc_13[_loc_12];
                                            with (_loc_13[_loc_12])
                                            {
                                                if (@label == "Architecture")
                                                {
                                                    _loc_11[_loc_12] = _loc_14;
                                                }
                                            }
                                        }
                                        var _loc_10:* = _loc_11.tier1;
                                        var _loc_8:* = new XMLList("");
                                        for each (_loc_11 in _loc_10)
                                        {
                                            
                                            var _loc_12:* = _loc_10[_loc_9];
                                            with (_loc_10[_loc_9])
                                            {
                                                if (@label == "Location")
                                                {
                                                    _loc_8[_loc_9] = _loc_11;
                                                }
                                            }
                                        }
                                        var _loc_7:* = _loc_8.tier2;
                                        var _loc_5:* = new XMLList("");
                                        for each (_loc_8 in _loc_7)
                                        {
                                            
                                            var _loc_9:* = _loc_7[_loc_6];
                                            with (_loc_7[_loc_6])
                                            {
                                                if (@label == toUppercaseWithCaps(pathNames[3]))
                                                {
                                                    _loc_5[_loc_6] = _loc_8;
                                                }
                                            }
                                        }
                                        var _loc_4:* = _loc_5.tier3;
                                        var _loc_2:* = new XMLList("");
                                        for each (_loc_5 in _loc_4)
                                        {
                                            
                                            var _loc_6:* = _loc_4[_loc_3];
                                            with (_loc_4[_loc_3])
                                            {
                                                if (@label == toUppercase(pathNames[4]))
                                                {
                                                    _loc_2[_loc_3] = _loc_5;
                                                }
                                            }
                                        }
                                        containerShell.newShell("locationShell", _loc_2.tier4, pathNames[5]);
                                    }
                                    break;
                                }
                                default:
                                {
                                    break;
                                }
                            }
                            break;
                        }
                        case "products":
                        {
                            switch(pathNames[2])
                            {
                                case "name":
                                {
                                    if (pathNames[4] != undefined)
                                    {
                                        menuShell.hRule1On();
                                        if (pathNames[5] == "sub")
                                        {
                                            if (comparePathNames(5) == true)
                                            {
                                                if (pathNames[7] != undefined)
                                                {
                                                    containerShell.updateProjectSubNav(pathNames[6], pathNames[7]);
                                                }
                                                else if (pathNames[6] != undefined)
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(pathNames[6], 0);
                                                }
                                                else
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(0, 0);
                                                }
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                if (pathNames[7] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, pathNames[6], pathNames[7]);
                                                }
                                                else if (pathNames[6] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, pathNames[6], 0);
                                                }
                                                else
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, 0, 0);
                                                }
                                            }
                                        }
                                        else if (pathNames[5] != undefined)
                                        {
                                            if (comparePathNames(5) == true)
                                            {
                                                containerShell.updateProjectNav(pathNames[5]);
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                containerShell.newProject(pathNames[4], pathNames[5]);
                                            }
                                        }
                                        else
                                        {
                                            containerShell.newProject(pathNames[4], 0);
                                        }
                                    }
                                    else if (pathNames[3] != undefined)
                                    {
                                        pathNamesClone = [];
                                        var _loc_3:int = 0;
                                        var _loc_6:int = 0;
                                        var _loc_7:* = myXML.nav.projects.tier0;
                                        var _loc_5:* = new XMLList("");
                                        for each (_loc_8 in _loc_7)
                                        {
                                            
                                            var _loc_9:* = _loc_7[_loc_6];
                                            with (_loc_7[_loc_6])
                                            {
                                                if (@label == "Products")
                                                {
                                                    _loc_5[_loc_6] = _loc_8;
                                                }
                                            }
                                        }
                                        var _loc_4:* = _loc_5.tier1;
                                        var _loc_2:* = new XMLList("");
                                        for each (_loc_5 in _loc_4)
                                        {
                                            
                                            var _loc_6:* = _loc_4[_loc_3];
                                            with (_loc_4[_loc_3])
                                            {
                                                if (@label == "Name")
                                                {
                                                    _loc_2[_loc_3] = _loc_5;
                                                }
                                            }
                                        }
                                        containerShell.newShell("nameShell", _loc_2.tier2, pathNames[3]);
                                    }
                                    break;
                                }
                                case "type":
                                {
                                    if (pathNames[3] != undefined)
                                    {
                                        if (pathNames[5] != undefined)
                                        {
                                            if (pathNames[6] == "sub")
                                            {
                                                if (comparePathNames(6) == true)
                                                {
                                                    if (pathNames[8] != undefined)
                                                    {
                                                        containerShell.updateProjectSubNav(pathNames[7], pathNames[8]);
                                                    }
                                                    else if (pathNames[7] != undefined)
                                                    {
                                                        clonePathNames();
                                                        containerShell.updateProjectSubNav(pathNames[7], 0);
                                                    }
                                                    else
                                                    {
                                                        clonePathNames();
                                                        containerShell.updateProjectSubNav(0, 0);
                                                    }
                                                }
                                                else
                                                {
                                                    clonePathNames();
                                                    if (pathNames[8] != undefined)
                                                    {
                                                        containerShell.newSubProject(pathNames[5], 6, pathNames[7], pathNames[8]);
                                                    }
                                                    else if (pathNames[7] != undefined)
                                                    {
                                                        containerShell.newSubProject(pathNames[5], 6, pathNames[7], 0);
                                                    }
                                                    else
                                                    {
                                                        containerShell.newSubProject(pathNames[5], 6, 0, 0);
                                                    }
                                                }
                                            }
                                            else if (pathNames[6] != undefined)
                                            {
                                                if (comparePathNames(6) == true)
                                                {
                                                    containerShell.updateProjectNav(pathNames[6]);
                                                }
                                                else
                                                {
                                                    clonePathNames();
                                                    containerShell.newProject(pathNames[5], pathNames[6]);
                                                }
                                            }
                                            else
                                            {
                                                containerShell.newProject(pathNames[5], 0);
                                            }
                                        }
                                        else
                                        {
                                            pathNamesClone = [];
                                            var _loc_3:int = 0;
                                            var _loc_6:int = 0;
                                            var _loc_9:int = 0;
                                            var _loc_10:* = myXML.nav.projects.tier0;
                                            var _loc_8:* = new XMLList("");
                                            for each (_loc_11 in _loc_10)
                                            {
                                                
                                                var _loc_12:* = _loc_10[_loc_9];
                                                with (_loc_10[_loc_9])
                                                {
                                                    if (@label == "Products")
                                                    {
                                                        _loc_8[_loc_9] = _loc_11;
                                                    }
                                                }
                                            }
                                            var _loc_7:* = _loc_8.tier1;
                                            var _loc_5:* = new XMLList("");
                                            for each (_loc_8 in _loc_7)
                                            {
                                                
                                                var _loc_9:* = _loc_7[_loc_6];
                                                with (_loc_7[_loc_6])
                                                {
                                                    if (@label == "Type")
                                                    {
                                                        _loc_5[_loc_6] = _loc_8;
                                                    }
                                                }
                                            }
                                            var _loc_4:* = _loc_5.tier2;
                                            var _loc_2:* = new XMLList("");
                                            for each (_loc_5 in _loc_4)
                                            {
                                                
                                                var _loc_6:* = _loc_4[_loc_3];
                                                with (_loc_4[_loc_3])
                                                {
                                                    if (@label == toUppercase(pathNames[3]))
                                                    {
                                                        _loc_2[_loc_3] = _loc_5;
                                                    }
                                                }
                                            }
                                            containerShell.newShell("typeShell", _loc_2, pathNames[4]);
                                        }
                                    }
                                    break;
                                }
                                case "date":
                                {
                                    if (pathNames[4] != undefined)
                                    {
                                        if (pathNames[5] == "sub")
                                        {
                                            if (comparePathNames(5) == true)
                                            {
                                                if (pathNames[7] != undefined)
                                                {
                                                    containerShell.updateProjectSubNav(pathNames[6], pathNames[7]);
                                                }
                                                else if (pathNames[6] != undefined)
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(pathNames[6], 0);
                                                }
                                                else
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(0, 0);
                                                }
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                if (pathNames[7] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, pathNames[6], pathNames[7]);
                                                }
                                                else if (pathNames[6] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, pathNames[6], 0);
                                                }
                                                else
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, 0, 0);
                                                }
                                            }
                                        }
                                        else if (pathNames[5] != undefined)
                                        {
                                            if (comparePathNames(5) == true)
                                            {
                                                containerShell.updateProjectNav(pathNames[5]);
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                containerShell.newProject(pathNames[4], pathNames[5]);
                                            }
                                        }
                                        else
                                        {
                                            containerShell.newProject(pathNames[4], 0);
                                        }
                                    }
                                    else
                                    {
                                        pathNamesClone = [];
                                        if (pathNames[3] != undefined)
                                        {
                                            var _loc_3:int = 0;
                                            var _loc_6:int = 0;
                                            var _loc_7:* = myXML.nav.projects.tier0;
                                            var _loc_5:* = new XMLList("");
                                            for each (_loc_8 in _loc_7)
                                            {
                                                
                                                var _loc_9:* = _loc_7[_loc_6];
                                                with (_loc_7[_loc_6])
                                                {
                                                    if (@label == "Products")
                                                    {
                                                        _loc_5[_loc_6] = _loc_8;
                                                    }
                                                }
                                            }
                                            var _loc_4:* = _loc_5.tier1;
                                            var _loc_2:* = new XMLList("");
                                            for each (_loc_5 in _loc_4)
                                            {
                                                
                                                var _loc_6:* = _loc_4[_loc_3];
                                                with (_loc_4[_loc_3])
                                                {
                                                    if (@label == "Date")
                                                    {
                                                        _loc_2[_loc_3] = _loc_5;
                                                    }
                                                }
                                            }
                                            containerShell.newShell("dateShell", _loc_2.tier2, pathNames[4]);
                                        }
                                    }
                                    break;
                                }
                                case "visual":
                                {
                                    if (pathNames[4] != undefined)
                                    {
                                        menuShell.hRule1On();
                                        if (pathNames[5] == "sub")
                                        {
                                            if (comparePathNames(5) == true)
                                            {
                                                if (pathNames[7] != undefined)
                                                {
                                                    containerShell.updateProjectSubNav(pathNames[6], pathNames[7]);
                                                }
                                                else if (pathNames[6] != undefined)
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(pathNames[6], 0);
                                                }
                                                else
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(0, 0);
                                                }
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                if (pathNames[7] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, pathNames[6], pathNames[7]);
                                                }
                                                else if (pathNames[6] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, pathNames[6], 0);
                                                }
                                                else
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, 0, 0);
                                                }
                                            }
                                        }
                                        else if (pathNames[5] != undefined)
                                        {
                                            if (comparePathNames(5) == true)
                                            {
                                                containerShell.updateProjectNav(pathNames[5]);
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                containerShell.newProject(pathNames[4], pathNames[5]);
                                            }
                                        }
                                        else
                                        {
                                            containerShell.newProject(pathNames[4], 0);
                                        }
                                    }
                                    else if (pathNames[3] != undefined)
                                    {
                                        pathNamesClone = [];
                                        var _loc_3:int = 0;
                                        var _loc_6:int = 0;
                                        var _loc_7:* = myXML.nav.projects.tier0;
                                        var _loc_5:* = new XMLList("");
                                        for each (_loc_8 in _loc_7)
                                        {
                                            
                                            var _loc_9:* = _loc_7[_loc_6];
                                            with (_loc_7[_loc_6])
                                            {
                                                if (@label == "Products")
                                                {
                                                    _loc_5[_loc_6] = _loc_8;
                                                }
                                            }
                                        }
                                        var _loc_4:* = _loc_5.tier1;
                                        var _loc_2:* = new XMLList("");
                                        for each (_loc_5 in _loc_4)
                                        {
                                            
                                            var _loc_6:* = _loc_4[_loc_3];
                                            with (_loc_4[_loc_3])
                                            {
                                                if (@label == "Visual")
                                                {
                                                    _loc_2[_loc_3] = _loc_5;
                                                }
                                            }
                                        }
                                        containerShell.newShell("visualShell", _loc_2, pathNames[3]);
                                    }
                                    break;
                                }
                                default:
                                {
                                    break;
                                }
                            }
                            break;
                        }
                        case "exhibitions":
                        {
                            switch(pathNames[2])
                            {
                                case "name":
                                {
                                    if (pathNames[4] != undefined)
                                    {
                                        menuShell.hRule1On();
                                        if (pathNames[5] == "sub")
                                        {
                                            if (comparePathNames(5) == true)
                                            {
                                                if (pathNames[7] != undefined)
                                                {
                                                    containerShell.updateProjectSubNav(pathNames[6], pathNames[7]);
                                                }
                                                else if (pathNames[6] != undefined)
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(pathNames[6], 0);
                                                }
                                                else
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(0, 0);
                                                }
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                if (pathNames[7] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, pathNames[6], pathNames[7]);
                                                }
                                                else if (pathNames[6] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, pathNames[6], 0);
                                                }
                                                else
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, 0, 0);
                                                }
                                            }
                                        }
                                        else if (pathNames[5] != undefined)
                                        {
                                            if (comparePathNames(5) == true)
                                            {
                                                containerShell.updateProjectNav(pathNames[5]);
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                containerShell.newProject(pathNames[4], pathNames[5]);
                                            }
                                        }
                                        else
                                        {
                                            containerShell.newProject(pathNames[4], 0);
                                        }
                                    }
                                    else if (pathNames[3] != undefined)
                                    {
                                        pathNamesClone = [];
                                        var _loc_3:int = 0;
                                        var _loc_6:int = 0;
                                        var _loc_7:* = myXML.nav.projects.tier0;
                                        var _loc_5:* = new XMLList("");
                                        for each (_loc_8 in _loc_7)
                                        {
                                            
                                            var _loc_9:* = _loc_7[_loc_6];
                                            with (_loc_7[_loc_6])
                                            {
                                                if (@label == "Exhibitions")
                                                {
                                                    _loc_5[_loc_6] = _loc_8;
                                                }
                                            }
                                        }
                                        var _loc_4:* = _loc_5.tier1;
                                        var _loc_2:* = new XMLList("");
                                        for each (_loc_5 in _loc_4)
                                        {
                                            
                                            var _loc_6:* = _loc_4[_loc_3];
                                            with (_loc_4[_loc_3])
                                            {
                                                if (@label == "Name")
                                                {
                                                    _loc_2[_loc_3] = _loc_5;
                                                }
                                            }
                                        }
                                        containerShell.newShell("nameShell", _loc_2.tier2, pathNames[3]);
                                    }
                                    break;
                                }
                                case "date":
                                {
                                    if (pathNames[4] != undefined)
                                    {
                                        if (pathNames[5] == "sub")
                                        {
                                            if (comparePathNames(5) == true)
                                            {
                                                if (pathNames[7] != undefined)
                                                {
                                                    containerShell.updateProjectSubNav(pathNames[6], pathNames[7]);
                                                }
                                                else if (pathNames[6] != undefined)
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(pathNames[6], 0);
                                                }
                                                else
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(0, 0);
                                                }
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                if (pathNames[7] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, pathNames[6], pathNames[7]);
                                                }
                                                else if (pathNames[6] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, pathNames[6], 0);
                                                }
                                                else
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, 0, 0);
                                                }
                                            }
                                        }
                                        else if (pathNames[5] != undefined)
                                        {
                                            if (comparePathNames(5) == true)
                                            {
                                                containerShell.updateProjectNav(pathNames[5]);
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                containerShell.newProject(pathNames[4], pathNames[5]);
                                            }
                                        }
                                        else
                                        {
                                            containerShell.newProject(pathNames[4], 0);
                                        }
                                    }
                                    else
                                    {
                                        pathNamesClone = [];
                                        if (pathNames[3] != undefined)
                                        {
                                            var _loc_3:int = 0;
                                            var _loc_6:int = 0;
                                            var _loc_7:* = myXML.nav.projects.tier0;
                                            var _loc_5:* = new XMLList("");
                                            for each (_loc_8 in _loc_7)
                                            {
                                                
                                                var _loc_9:* = _loc_7[_loc_6];
                                                with (_loc_7[_loc_6])
                                                {
                                                    if (@label == "Exhibitions")
                                                    {
                                                        _loc_5[_loc_6] = _loc_8;
                                                    }
                                                }
                                            }
                                            var _loc_4:* = _loc_5.tier1;
                                            var _loc_2:* = new XMLList("");
                                            for each (_loc_5 in _loc_4)
                                            {
                                                
                                                var _loc_6:* = _loc_4[_loc_3];
                                                with (_loc_4[_loc_3])
                                                {
                                                    if (@label == "Date")
                                                    {
                                                        _loc_2[_loc_3] = _loc_5;
                                                    }
                                                }
                                            }
                                            containerShell.newShell("dateShell", _loc_2.tier2, pathNames[4]);
                                        }
                                    }
                                    break;
                                }
                                case "location":
                                {
                                    if (pathNames[6] != undefined)
                                    {
                                        if (pathNames[7] == "sub")
                                        {
                                            if (comparePathNames(7) == true)
                                            {
                                                if (pathNames[9] != undefined)
                                                {
                                                    containerShell.updateProjectSubNav(pathNames[8], pathNames[9]);
                                                }
                                                else if (pathNames[8] != undefined)
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(pathNames[8], 0);
                                                }
                                                else
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(0, 0);
                                                }
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                if (pathNames[9] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[6], 7, pathNames[8], pathNames[9]);
                                                }
                                                else if (pathNames[8] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[6], 7, pathNames[8], 0);
                                                }
                                                else
                                                {
                                                    containerShell.newSubProject(pathNames[6], 7, 0, 0);
                                                }
                                            }
                                        }
                                        else if (pathNames[7] != undefined)
                                        {
                                            if (comparePathNames(7) == true)
                                            {
                                                containerShell.updateProjectNav(pathNames[7]);
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                containerShell.newProject(pathNames[6], pathNames[7]);
                                            }
                                        }
                                        else
                                        {
                                            containerShell.newProject(pathNames[6], 0);
                                        }
                                    }
                                    else if (pathNames[3] != undefined)
                                    {
                                        pathNamesClone = [];
                                        var _loc_3:int = 0;
                                        var _loc_6:int = 0;
                                        var _loc_9:int = 0;
                                        var _loc_12:int = 0;
                                        var _loc_13:* = myXML.nav.projects.tier0;
                                        var _loc_11:* = new XMLList("");
                                        for each (_loc_14 in _loc_13)
                                        {
                                            
                                            var _loc_15:* = _loc_13[_loc_12];
                                            with (_loc_13[_loc_12])
                                            {
                                                if (@label == "Exhibitions")
                                                {
                                                    _loc_11[_loc_12] = _loc_14;
                                                }
                                            }
                                        }
                                        var _loc_10:* = _loc_11.tier1;
                                        var _loc_8:* = new XMLList("");
                                        for each (_loc_11 in _loc_10)
                                        {
                                            
                                            var _loc_12:* = _loc_10[_loc_9];
                                            with (_loc_10[_loc_9])
                                            {
                                                if (@label == "Location")
                                                {
                                                    _loc_8[_loc_9] = _loc_11;
                                                }
                                            }
                                        }
                                        var _loc_7:* = _loc_8.tier2;
                                        var _loc_5:* = new XMLList("");
                                        for each (_loc_8 in _loc_7)
                                        {
                                            
                                            var _loc_9:* = _loc_7[_loc_6];
                                            with (_loc_7[_loc_6])
                                            {
                                                if (@label == toUppercaseWithCaps(pathNames[3]))
                                                {
                                                    _loc_5[_loc_6] = _loc_8;
                                                }
                                            }
                                        }
                                        var _loc_4:* = _loc_5.tier3;
                                        var _loc_2:* = new XMLList("");
                                        for each (_loc_5 in _loc_4)
                                        {
                                            
                                            var _loc_6:* = _loc_4[_loc_3];
                                            with (_loc_4[_loc_3])
                                            {
                                                if (@label == toUppercase(pathNames[4]))
                                                {
                                                    _loc_2[_loc_3] = _loc_5;
                                                }
                                            }
                                        }
                                        containerShell.newShell("locationShell", _loc_2.tier4, pathNames[5]);
                                    }
                                    break;
                                }
                                case "visual":
                                {
                                    if (pathNames[4] != undefined)
                                    {
                                        menuShell.hRule1On();
                                        if (pathNames[5] == "sub")
                                        {
                                            if (comparePathNames(5) == true)
                                            {
                                                if (pathNames[7] != undefined)
                                                {
                                                    containerShell.updateProjectSubNav(pathNames[6], pathNames[7]);
                                                }
                                                else if (pathNames[6] != undefined)
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(pathNames[6], 0);
                                                }
                                                else
                                                {
                                                    clonePathNames();
                                                    containerShell.updateProjectSubNav(0, 0);
                                                }
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                if (pathNames[8] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, pathNames[6], pathNames[7]);
                                                }
                                                else if (pathNames[6] != undefined)
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, pathNames[6], 0);
                                                }
                                                else
                                                {
                                                    containerShell.newSubProject(pathNames[4], 5, 0, 0);
                                                }
                                            }
                                        }
                                        else if (pathNames[5] != undefined)
                                        {
                                            if (comparePathNames(5) == true)
                                            {
                                                containerShell.updateProjectNav(pathNames[5]);
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                containerShell.newProject(pathNames[4], pathNames[5]);
                                            }
                                        }
                                        else
                                        {
                                            containerShell.newProject(pathNames[4], 0);
                                        }
                                    }
                                    else if (pathNames[3] != undefined)
                                    {
                                        pathNamesClone = [];
                                        var _loc_3:int = 0;
                                        var _loc_6:int = 0;
                                        var _loc_7:* = myXML.nav.projects.tier0;
                                        var _loc_5:* = new XMLList("");
                                        for each (_loc_8 in _loc_7)
                                        {
                                            
                                            var _loc_9:* = _loc_7[_loc_6];
                                            with (_loc_7[_loc_6])
                                            {
                                                if (@label == "Exhibitions")
                                                {
                                                    _loc_5[_loc_6] = _loc_8;
                                                }
                                            }
                                        }
                                        var _loc_4:* = _loc_5.tier1;
                                        var _loc_2:* = new XMLList("");
                                        for each (_loc_5 in _loc_4)
                                        {
                                            
                                            var _loc_6:* = _loc_4[_loc_3];
                                            with (_loc_4[_loc_3])
                                            {
                                                if (@label == "Visual")
                                                {
                                                    _loc_2[_loc_3] = _loc_5;
                                                }
                                            }
                                        }
                                        containerShell.newShell("visualShell", _loc_2, pathNames[3]);
                                    }
                                    break;
                                }
                                default:
                                {
                                    break;
                                }
                            }
                            break;
                        }
                        default:
                        {
                            break;
                        }
                    }
                    break;
                }
					
					
					
					
					
                case "practice":
                {
                    menuShell.hRule1On();
                    switch(pathNames[1])
                    {
                        case "partners":
                        {
                            if (pathNames[3] != undefined)
                            {
                                if (pathNames[4] != undefined)
                                {
                                    if (comparePathNames(4) == true)
                                    {
                                        containerShell.updatePracticeNav(pathNames[4]);
                                    }
                                    else
                                    {
                                        clonePathNames();
                                        containerShell.newPracContainer(pathNames[3], pathNames[4]);
                                    }
                                }
                                else
                                {
                                    containerShell.newPracContainer(pathNames[3], 0);
                                }
                            }
                            else if (pathNames[2] != undefined)
                            {
                                pathNamesClone = [];
                                var _loc_3:int = 0;
                                var _loc_4:* = myXML.nav.practice.tier0;
                                var _loc_2:* = new XMLList("");
                                for each (_loc_5 in _loc_4)
                                {
                                    
                                    var _loc_6:* = _loc_4[_loc_3];
                                    with (_loc_4[_loc_3])
                                    {
                                        if (@label == "Partners")
                                        {
                                            _loc_2[_loc_3] = _loc_5;
                                        }
                                    }
                                }
                                containerShell.newShell("partnerShell", _loc_2, pathNames[2]);
                            }
                            break;
                        }
                        case "staff":
                        {
                            menuShell.hRule1On();
                            if (pathNames[4] != undefined)
                            {
                                if (pathNames[2] == "new-york")
                                {
                                    if (pathNames[3] == "senior-staff")
                                    {
                                        if (pathNames[5] != undefined)
                                        {
                                            if (pathNames[6] != undefined)
                                            {
                                                if (comparePathNames(6) == true)
                                                {
                                                    containerShell.updatePracticeNav(pathNames[6]);
                                                }
                                                else
                                                {
                                                    clonePathNames();
                                                    containerShell.newPracContainer(pathNames[5], pathNames[6]);
                                                }
                                            }
                                            else
                                            {
                                                containerShell.newPracContainer(pathNames[5], 0);
                                            }
                                        }
                                        else
                                        {
                                            pathNamesClone = [];
                                            var _loc_3:int = 0;
                                            var _loc_6:int = 0;
                                            var _loc_9:int = 0;
                                            var _loc_10:* = myXML.nav.practice.tier0;
                                            var _loc_8:* = new XMLList("");
                                            for each (_loc_11 in _loc_10)
                                            {
                                                
                                                var _loc_12:* = _loc_10[_loc_9];
                                                with (_loc_10[_loc_9])
                                                {
                                                    if (@label == "Staff")
                                                    {
                                                        _loc_8[_loc_9] = _loc_11;
                                                    }
                                                }
                                            }
                                            var _loc_7:* = _loc_8.tier1;
                                            var _loc_5:* = new XMLList("");
                                            for each (_loc_8 in _loc_7)
                                            {
                                                
                                                var _loc_9:* = _loc_7[_loc_6];
                                                with (_loc_7[_loc_6])
                                                {
                                                    if (@label == "New York")
                                                    {
                                                        _loc_5[_loc_6] = _loc_8;
                                                    }
                                                }
                                            }
                                            var _loc_4:* = _loc_5.tier2;
                                            var _loc_2:* = new XMLList("");
                                            for each (_loc_5 in _loc_4)
                                            {
                                                
                                                var _loc_6:* = _loc_4[_loc_3];
                                                with (_loc_4[_loc_3])
                                                {
                                                    if (@label == "Senior Staff")
                                                    {
                                                        _loc_2[_loc_3] = _loc_5;
                                                    }
                                                }
                                            }
                                            containerShell.newShell("staffShell", _loc_2, pathNames[4]);
                                        }
                                    }
                                    else if (pathNames[3] == "associates")
                                    {
                                        var _loc_3:int = 0;
                                        var _loc_6:int = 0;
                                        var _loc_9:int = 0;
                                        var _loc_10:* = myXML.nav.practice.tier0;
                                        var _loc_8:* = new XMLList("");
                                        for each (_loc_11 in _loc_10)
                                        {
                                            
                                            var _loc_12:* = _loc_10[_loc_9];
                                            with (_loc_10[_loc_9])
                                            {
                                                if (@label == "Staff")
                                                {
                                                    _loc_8[_loc_9] = _loc_11;
                                                }
                                            }
                                        }
                                        var _loc_7:* = _loc_8.tier1;
                                        var _loc_5:* = new XMLList("");
                                        for each (_loc_8 in _loc_7)
                                        {
                                            
                                            var _loc_9:* = _loc_7[_loc_6];
                                            with (_loc_7[_loc_6])
                                            {
                                                if (@label == "New York")
                                                {
                                                    _loc_5[_loc_6] = _loc_8;
                                                }
                                            }
                                        }
                                        var _loc_4:* = _loc_5.tier2;
                                        var _loc_2:* = new XMLList("");
                                        for each (_loc_5 in _loc_4)
                                        {
                                            
                                            var _loc_6:* = _loc_4[_loc_3];
                                            with (_loc_4[_loc_3])
                                            {
                                                if (@label == "Associates")
                                                {
                                                    _loc_2[_loc_3] = _loc_5;
                                                }
                                            }
                                        }
                                        containerShell.newShell("staffShell", _loc_2, pathNames[4]);
                                    }
                                }
                                else if (pathNames[2] == "los-angeles")
                                {
                                    if (pathNames[3] == "senior-staff")
                                    {
                                        if (pathNames[5] != undefined)
                                        {
                                            if (pathNames[6] != undefined)
                                            {
                                                if (comparePathNames(6) == true)
                                                {
                                                    containerShell.updatePracticeNav(pathNames[6]);
                                                }
                                                else
                                                {
                                                    clonePathNames();
                                                    containerShell.newPracContainer(pathNames[5], pathNames[6]);
                                                }
                                            }
                                            else
                                            {
                                                containerShell.newPracContainer(pathNames[5], 0);
                                            }
                                        }
                                        else
                                        {
                                            pathNamesClone = [];
                                            var _loc_3:int = 0;
                                            var _loc_6:int = 0;
                                            var _loc_9:int = 0;
                                            var _loc_10:* = myXML.nav.practice.tier0;
                                            var _loc_8:* = new XMLList("");
                                            for each (_loc_11 in _loc_10)
                                            {
                                                
                                                var _loc_12:* = _loc_10[_loc_9];
                                                with (_loc_10[_loc_9])
                                                {
                                                    if (@label == "Staff")
                                                    {
                                                        _loc_8[_loc_9] = _loc_11;
                                                    }
                                                }
                                            }
                                            var _loc_7:* = _loc_8.tier1;
                                            var _loc_5:* = new XMLList("");
                                            for each (_loc_8 in _loc_7)
                                            {
                                                
                                                var _loc_9:* = _loc_7[_loc_6];
                                                with (_loc_7[_loc_6])
                                                {
                                                    if (@label == "Los Angeles")
                                                    {
                                                        _loc_5[_loc_6] = _loc_8;
                                                    }
                                                }
                                            }
                                            var _loc_4:* = _loc_5.tier2;
                                            var _loc_2:* = new XMLList("");
                                            for each (_loc_5 in _loc_4)
                                            {
                                                
                                                var _loc_6:* = _loc_4[_loc_3];
                                                with (_loc_4[_loc_3])
                                                {
                                                    if (@label == "Senior Staff")
                                                    {
                                                        _loc_2[_loc_3] = _loc_5;
                                                    }
                                                }
                                            }
                                            containerShell.newShell("staffShell", _loc_2, pathNames[4]);
                                        }
                                    }
                                    else if (pathNames[3] == "associates")
                                    {
                                        var _loc_3:int = 0;
                                        var _loc_6:int = 0;
                                        var _loc_9:int = 0;
                                        var _loc_10:* = myXML.nav.practice.tier0;
                                        var _loc_8:* = new XMLList("");
                                        for each (_loc_11 in _loc_10)
                                        {
                                            
                                            var _loc_12:* = _loc_10[_loc_9];
                                            with (_loc_10[_loc_9])
                                            {
                                                if (@label == "Staff")
                                                {
                                                    _loc_8[_loc_9] = _loc_11;
                                                }
                                            }
                                        }
                                        var _loc_7:* = _loc_8.tier1;
                                        var _loc_5:* = new XMLList("");
                                        for each (_loc_8 in _loc_7)
                                        {
                                            
                                            var _loc_9:* = _loc_7[_loc_6];
                                            with (_loc_7[_loc_6])
                                            {
                                                if (@label == "Los Angeles")
                                                {
                                                    _loc_5[_loc_6] = _loc_8;
                                                }
                                            }
                                        }
                                        var _loc_4:* = _loc_5.tier2;
                                        var _loc_2:* = new XMLList("");
                                        for each (_loc_5 in _loc_4)
                                        {
                                            
                                            var _loc_6:* = _loc_4[_loc_3];
                                            with (_loc_4[_loc_3])
                                            {
                                                if (@label == "Associates")
                                                {
                                                    _loc_2[_loc_3] = _loc_5;
                                                }
                                            }
                                        }
                                        containerShell.newShell("staffShell", _loc_2, pathNames[4]);
                                    }
                                }
                            }
                            break;
                        }
                        case "awards":
                        {
                            if (pathNames[3] != undefined)
                            {
                                if (pathNames[4] != undefined)
                                {
                                    if (comparePathNames(4) == true)
                                    {
                                        containerShell.updatePracticeNav(pathNames[4]);
                                    }
                                    else
                                    {
                                        clonePathNames();
                                        containerShell.newPracContainer(pathNames[3], pathNames[4]);
                                    }
                                }
                                else
                                {
                                    containerShell.newPracContainer(pathNames[3], 0);
                                }
                            }
                            else if (pathNames[2] != undefined)
                            {
                                pathNamesClone = [];
                                var _loc_3:int = 0;
                                var _loc_4:* = myXML.nav.practice.tier0;
                                var _loc_2:* = new XMLList("");
                                for each (_loc_5 in _loc_4)
                                {
                                    
                                    var _loc_6:* = _loc_4[_loc_3];
                                    with (_loc_4[_loc_3])
                                    {
                                        if (@label == "Awards")
                                        {
                                            _loc_2[_loc_3] = _loc_5;
                                        }
                                    }
                                }
                                containerShell.newShell("awardsShell", _loc_2.tier1, pathNames[2]);
                            }
                            break;
                        }
                        case "lectures":
                        {
                            if (pathNames[3] != undefined)
                            {
                                if (pathNames[4] != undefined)
                                {
                                    if (comparePathNames(4) == true)
                                    {
                                        containerShell.updatePracticeNav(pathNames[4]);
                                    }
                                    else
                                    {
                                        clonePathNames();
                                        containerShell.newPracContainer(pathNames[3], pathNames[4]);
                                    }
                                }
                                else
                                {
                                    containerShell.newPracContainer(pathNames[3], 0);
                                }
                            }
                            else if (pathNames[2] != undefined)
                            {
                                pathNamesClone = [];
                                var _loc_3:int = 0;
                                var _loc_4:* = myXML.nav.practice.tier0;
                                var _loc_2:* = new XMLList("");
                                for each (_loc_5 in _loc_4)
                                {
                                    
                                    var _loc_6:* = _loc_4[_loc_3];
                                    with (_loc_4[_loc_3])
                                    {
                                        if (@label == "Lectures")
                                        {
                                            _loc_2[_loc_3] = _loc_5;
                                        }
                                    }
                                }
                                containerShell.newShell("triColShell", _loc_2.tier1, pathNames[2]);
                            }
                            break;
                        }
                        case "selected-text":
                        {
                            if (pathNames[3] != undefined)
                            {
                                if (pathNames[4] != undefined)
                                {
                                    if (comparePathNames(4) == true)
                                    {
                                        containerShell.updatePracticeNav(pathNames[4]);
                                    }
                                    else
                                    {
                                        clonePathNames();
                                        containerShell.newPracContainer(pathNames[3], pathNames[4]);
                                    }
                                }
                                else
                                {
                                    containerShell.newPracContainer(pathNames[3], 0);
                                }
                            }
                            else if (pathNames[2] != undefined)
                            {
                                pathNamesClone = [];
                                var _loc_3:int = 0;
                                var _loc_4:* = myXML.nav.practice.tier0;
                                var _loc_2:* = new XMLList("");
                                for each (_loc_5 in _loc_4)
                                {
                                    
                                    var _loc_6:* = _loc_4[_loc_3];
                                    with (_loc_4[_loc_3])
                                    {
                                        if (@label == "Selected Text")
                                        {
                                            _loc_2[_loc_3] = _loc_5;
                                        }
                                    }
                                }
                                containerShell.newShell("triColShell", _loc_2.tier1, pathNames[2]);
                            }
                            break;
                        }
                        case "books":
                        {
                            switch(pathNames[2])
                            {
                                case "recent":
                                {
                                    if (pathNames[4] != undefined)
                                    {
                                        if (pathNames[5] != undefined)
                                        {
                                            if (comparePathNames(5) == true)
                                            {
                                                containerShell.updatePracticeNav(pathNames[5]);
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                containerShell.newPracContainer(pathNames[4], pathNames[5]);
                                            }
                                        }
                                        else
                                        {
                                            containerShell.newPracContainer(pathNames[4], 0);
                                        }
                                    }
                                    else
                                    {
                                        pathNamesClone = [];
                                        var _loc_3:int = 0;
                                        var _loc_6:int = 0;
                                        var _loc_7:* = myXML.nav.practice.tier0;
                                        var _loc_5:* = new XMLList("");
                                        for each (_loc_8 in _loc_7)
                                        {
                                            
                                            var _loc_9:* = _loc_7[_loc_6];
                                            with (_loc_7[_loc_6])
                                            {
                                                if (@label == "Books")
                                                {
                                                    _loc_5[_loc_6] = _loc_8;
                                                }
                                            }
                                        }
                                        var _loc_4:* = _loc_5.tier1;
                                        var _loc_2:* = new XMLList("");
                                        for each (_loc_5 in _loc_4)
                                        {
                                            
                                            var _loc_6:* = _loc_4[_loc_3];
                                            with (_loc_4[_loc_3])
                                            {
                                                if (@label == "Recent")
                                                {
                                                    _loc_2[_loc_3] = _loc_5;
                                                }
                                            }
                                        }
                                        containerShell.newShell("recentShell", _loc_2, pathNames[3]);
                                    }
                                    break;
                                }
                                case "archive":
                                {
                                    if (pathNames[4] != undefined)
                                    {
                                        if (pathNames[5] != undefined)
                                        {
                                            if (comparePathNames(5) == true)
                                            {
                                                containerShell.updatePracticeNav(pathNames[5]);
                                            }
                                            else
                                            {
                                                clonePathNames();
                                                containerShell.newPracContainer(pathNames[4], pathNames[5]);
                                            }
                                        }
                                        else
                                        {
                                            containerShell.newPracContainer(pathNames[4], 0);
                                        }
                                    }
                                    else
                                    {
                                        pathNamesClone = [];
                                        var _loc_3:int = 0;
                                        var _loc_6:int = 0;
                                        var _loc_7:* = myXML.nav.practice.tier0;
                                        var _loc_5:* = new XMLList("");
                                        for each (_loc_8 in _loc_7)
                                        {
                                            
                                            var _loc_9:* = _loc_7[_loc_6];
                                            with (_loc_7[_loc_6])
                                            {
                                                if (@label == "Books")
                                                {
                                                    _loc_5[_loc_6] = _loc_8;
                                                }
                                            }
                                        }
                                        var _loc_4:* = _loc_5.tier1;
                                        var _loc_2:* = new XMLList("");
                                        for each (_loc_5 in _loc_4)
                                        {
                                            
                                            var _loc_6:* = _loc_4[_loc_3];
                                            with (_loc_4[_loc_3])
                                            {
                                                if (@label == "Archive")
                                                {
                                                    _loc_2[_loc_3] = _loc_5;
                                                }
                                            }
                                        }
                                        containerShell.newShell("triColShell", _loc_2.tier2, pathNames[3]);
                                    }
                                    break;
                                }
                                default:
                                {
                                    break;
                                }
                            }
                            break;
                        }
                        case "press":
                        {
                            switch(pathNames[2])
                            {
                                case "publications":
                                {
                                    switch(pathNames[3])
                                    {
                                        case "recent":
                                        {
                                            if (pathNames[5] != undefined)
                                            {
                                                if (pathNames[6] != undefined)
                                                {
                                                    if (comparePathNames(6) == true)
                                                    {
                                                        containerShell.updatePracticeNav(pathNames[6]);
                                                    }
                                                    else
                                                    {
                                                        clonePathNames();
                                                        containerShell.newPracContainer(pathNames[5], pathNames[6]);
                                                    }
                                                }
                                                else
                                                {
                                                    containerShell.newPracContainer(pathNames[5], 0);
                                                }
                                            }
                                            else
                                            {
                                                pathNamesClone = [];
                                                var _loc_3:int = 0;
                                                var _loc_6:int = 0;
                                                var _loc_9:int = 0;
                                                var _loc_10:* = myXML.nav.practice.tier0;
                                                var _loc_8:* = new XMLList("");
                                                for each (_loc_11 in _loc_10)
                                                {
                                                    
                                                    var _loc_12:* = _loc_10[_loc_9];
                                                    with (_loc_10[_loc_9])
                                                    {
                                                        if (@label == "Press")
                                                        {
                                                            _loc_8[_loc_9] = _loc_11;
                                                        }
                                                    }
                                                }
                                                var _loc_7:* = _loc_8.tier1;
                                                var _loc_5:* = new XMLList("");
                                                for each (_loc_8 in _loc_7)
                                                {
                                                    
                                                    var _loc_9:* = _loc_7[_loc_6];
                                                    with (_loc_7[_loc_6])
                                                    {
                                                        if (@label == "Publications")
                                                        {
                                                            _loc_5[_loc_6] = _loc_8;
                                                        }
                                                    }
                                                }
                                                var _loc_4:* = _loc_5.tier2;
                                                var _loc_2:* = new XMLList("");
                                                for each (_loc_5 in _loc_4)
                                                {
                                                    
                                                    var _loc_6:* = _loc_4[_loc_3];
                                                    with (_loc_4[_loc_3])
                                                    {
                                                        if (@label == "Recent")
                                                        {
                                                            _loc_2[_loc_3] = _loc_5;
                                                        }
                                                    }
                                                }
                                                containerShell.newShell("recentShell", _loc_2, pathNames[4]);
                                            }
                                            break;
                                        }
                                        case "archive":
                                        {
                                            if (pathNames[5] != undefined)
                                            {
                                                if (pathNames[6] != undefined)
                                                {
                                                    if (comparePathNames(6) == true)
                                                    {
                                                        containerShell.updatePracticeNav(pathNames[6]);
                                                    }
                                                    else
                                                    {
                                                        clonePathNames();
                                                        containerShell.newPracContainer(pathNames[5], pathNames[6]);
                                                    }
                                                }
                                                else
                                                {
                                                    containerShell.newPracContainer(pathNames[5], 0);
                                                }
                                            }
                                            else
                                            {
                                                pathNamesClone = [];
                                                var _loc_3:int = 0;
                                                var _loc_6:int = 0;
                                                var _loc_9:int = 0;
                                                var _loc_10:* = myXML.nav.practice.tier0;
                                                var _loc_8:* = new XMLList("");
                                                for each (_loc_11 in _loc_10)
                                                {
                                                    
                                                    var _loc_12:* = _loc_10[_loc_9];
                                                    with (_loc_10[_loc_9])
                                                    {
                                                        if (@label == "Press")
                                                        {
                                                            _loc_8[_loc_9] = _loc_11;
                                                        }
                                                    }
                                                }
                                                var _loc_7:* = _loc_8.tier1;
                                                var _loc_5:* = new XMLList("");
                                                for each (_loc_8 in _loc_7)
                                                {
                                                    
                                                    var _loc_9:* = _loc_7[_loc_6];
                                                    with (_loc_7[_loc_6])
                                                    {
                                                        if (@label == "Publications")
                                                        {
                                                            _loc_5[_loc_6] = _loc_8;
                                                        }
                                                    }
                                                }
                                                var _loc_4:* = _loc_5.tier2;
                                                var _loc_2:* = new XMLList("");
                                                for each (_loc_5 in _loc_4)
                                                {
                                                    
                                                    var _loc_6:* = _loc_4[_loc_3];
                                                    with (_loc_4[_loc_3])
                                                    {
                                                        if (@label == "Archive")
                                                        {
                                                            _loc_2[_loc_3] = _loc_5;
                                                        }
                                                    }
                                                }
                                                containerShell.newShell("triColShell", _loc_2.tier3, pathNames[4]);
                                            }
                                            break;
                                        }
                                        default:
                                        {
                                            break;
                                        }
                                    }
                                    break;
                                }
                                case "releases":
                                {
                                    switch(pathNames[3])
                                    {
                                        case "recent":
                                        {
                                            if (pathNames[5] != undefined)
                                            {
                                                if (pathNames[6] != undefined)
                                                {
                                                    if (comparePathNames(6) == true)
                                                    {
                                                        containerShell.updatePracticeNav(pathNames[6]);
                                                    }
                                                    else
                                                    {
                                                        clonePathNames();
                                                        containerShell.newPracContainer(pathNames[5], pathNames[6]);
                                                    }
                                                }
                                                else
                                                {
                                                    containerShell.newPracContainer(pathNames[5], 0);
                                                }
                                            }
                                            else
                                            {
                                                pathNamesClone = [];
                                                var _loc_3:int = 0;
                                                var _loc_6:int = 0;
                                                var _loc_9:int = 0;
                                                var _loc_10:* = myXML.nav.practice.tier0;
                                                var _loc_8:* = new XMLList("");
                                                for each (_loc_11 in _loc_10)
                                                {
                                                    
                                                    var _loc_12:* = _loc_10[_loc_9];
                                                    with (_loc_10[_loc_9])
                                                    {
                                                        if (@label == "Press")
                                                        {
                                                            _loc_8[_loc_9] = _loc_11;
                                                        }
                                                    }
                                                }
                                                var _loc_7:* = _loc_8.tier1;
                                                var _loc_5:* = new XMLList("");
                                                for each (_loc_8 in _loc_7)
                                                {
                                                    
                                                    var _loc_9:* = _loc_7[_loc_6];
                                                    with (_loc_7[_loc_6])
                                                    {
                                                        if (@label == "Releases")
                                                        {
                                                            _loc_5[_loc_6] = _loc_8;
                                                        }
                                                    }
                                                }
                                                var _loc_4:* = _loc_5.tier2;
                                                var _loc_2:* = new XMLList("");
                                                for each (_loc_5 in _loc_4)
                                                {
                                                    
                                                    var _loc_6:* = _loc_4[_loc_3];
                                                    with (_loc_4[_loc_3])
                                                    {
                                                        if (@label == "Recent")
                                                        {
                                                            _loc_2[_loc_3] = _loc_5;
                                                        }
                                                    }
                                                }
                                                containerShell.newShell("recentShell", _loc_2, pathNames[4]);
                                            }
                                            break;
                                        }
                                        case "archive":
                                        {
                                            if (pathNames[5] != undefined)
                                            {
                                                if (pathNames[6] != undefined)
                                                {
                                                    if (comparePathNames(6) == true)
                                                    {
                                                        containerShell.updatePracticeNav(pathNames[6]);
                                                    }
                                                    else
                                                    {
                                                        clonePathNames();
                                                        containerShell.newPracContainer(pathNames[5], pathNames[6]);
                                                    }
                                                }
                                                else
                                                {
                                                    containerShell.newPracContainer(pathNames[5], 0);
                                                }
                                            }
                                            else
                                            {
                                                pathNamesClone = [];
                                                var _loc_3:int = 0;
                                                var _loc_6:int = 0;
                                                var _loc_9:int = 0;
                                                var _loc_10:* = myXML.nav.practice.tier0;
                                                var _loc_8:* = new XMLList("");
                                                for each (_loc_11 in _loc_10)
                                                {
                                                    
                                                    var _loc_12:* = _loc_10[_loc_9];
                                                    with (_loc_10[_loc_9])
                                                    {
                                                        if (@label == "Press")
                                                        {
                                                            _loc_8[_loc_9] = _loc_11;
                                                        }
                                                    }
                                                }
                                                var _loc_7:* = _loc_8.tier1;
                                                var _loc_5:* = new XMLList("");
                                                for each (_loc_8 in _loc_7)
                                                {
                                                    
                                                    var _loc_9:* = _loc_7[_loc_6];
                                                    with (_loc_7[_loc_6])
                                                    {
                                                        if (@label == "Releases")
                                                        {
                                                            _loc_5[_loc_6] = _loc_8;
                                                        }
                                                    }
                                                }
                                                var _loc_4:* = _loc_5.tier2;
                                                var _loc_2:* = new XMLList("");
                                                for each (_loc_5 in _loc_4)
                                                {
                                                    
                                                    var _loc_6:* = _loc_4[_loc_3];
                                                    with (_loc_4[_loc_3])
                                                    {
                                                        if (@label == "Archive")
                                                        {
                                                            _loc_2[_loc_3] = _loc_5;
                                                        }
                                                    }
                                                }
                                                containerShell.newShell("triColShell", _loc_2.tier3, pathNames[4]);
                                            }
                                            break;
                                        }
                                        default:
                                        {
                                            break;
                                        }
                                    }
                                    break;
                                }
                                case "video":
                                {
                                    if (pathNames[4] != undefined)
                                    {
                                        var _loc_3:int = 0;
                                        var _loc_6:int = 0;
                                        var _loc_9:int = 0;
                                        var _loc_10:* = myXML.nav.practice.tier0;
                                        var _loc_8:* = new XMLList("");
                                        for each (_loc_11 in _loc_10)
                                        {
                                            
                                            var _loc_12:* = _loc_10[_loc_9];
                                            with (_loc_10[_loc_9])
                                            {
                                                if (@label == "Press")
                                                {
                                                    _loc_8[_loc_9] = _loc_11;
                                                }
                                            }
                                        }
                                        var _loc_7:* = _loc_8.tier1;
                                        var _loc_5:* = new XMLList("");
                                        for each (_loc_8 in _loc_7)
                                        {
                                            
                                            var _loc_9:* = _loc_7[_loc_6];
                                            with (_loc_7[_loc_6])
                                            {
                                                if (@label == "Video")
                                                {
                                                    _loc_5[_loc_6] = _loc_8;
                                                }
                                            }
                                        }
                                        var _loc_4:* = _loc_5.item;
                                        var _loc_2:* = new XMLList("");
                                        for each (_loc_5 in _loc_4)
                                        {
                                            
                                            var _loc_6:* = _loc_4[_loc_3];
                                            with (_loc_4[_loc_3])
                                            {
                                                if (@id == pathNames[4])
                                                {
                                                    _loc_2[_loc_3] = _loc_5;
                                                }
                                            }
                                        }
                                        tempXMLList = new XMLList(_loc_2);
                                        containerShell.newVideoContainer(pathNames[4], tempXMLList.media.@url, tempXMLList.longTitle);
                                    }
                                    else
                                    {
                                        pathNamesClone = [];
                                        var _loc_3:int = 0;
                                        var _loc_6:int = 0;
                                        var _loc_7:* = myXML.nav.practice.tier0;
                                        var _loc_5:* = new XMLList("");
                                        for each (_loc_8 in _loc_7)
                                        {
                                            
                                            var _loc_9:* = _loc_7[_loc_6];
                                            with (_loc_7[_loc_6])
                                            {
                                                if (@label == "Press")
                                                {
                                                    _loc_5[_loc_6] = _loc_8;
                                                }
                                            }
                                        }
                                        var _loc_4:* = _loc_5.tier1;
                                        var _loc_2:* = new XMLList("");
                                        for each (_loc_5 in _loc_4)
                                        {
                                            
                                            var _loc_6:* = _loc_4[_loc_3];
                                            with (_loc_4[_loc_3])
                                            {
                                                if (@label == "Video")
                                                {
                                                    _loc_2[_loc_3] = _loc_5;
                                                }
                                            }
                                        }
                                        containerShell.newShell("iconShell", _loc_2, pathNames[3]);
                                    }
                                    break;
                                }
                                default:
                                {
                                    break;
                                }
                            }
                            break;
                        }
                        default:
                        {
                            break;
                        }
                    }
                    break;
                }
                case "contact":
                {
                    menuShell.hRule1On();
                    switch(pathNames[1])
                    {
                        case "general-info":
                        {
                            var _loc_3:int = 0;
                            var _loc_6:int = 0;
                            var _loc_7:* = myXML.nav.contact.tier0;
                            var _loc_5:* = new XMLList("");
                            for each (_loc_8 in _loc_7)
                            {
                                
                                var _loc_9:* = _loc_7[_loc_6];
                                with (_loc_7[_loc_6])
                                {
                                    if (@label == "General Info")
                                    {
                                        _loc_5[_loc_6] = _loc_8;
                                    }
                                }
                            }
                            var _loc_4:* = _loc_5.tier1;
                            var _loc_2:* = new XMLList("");
                            for each (_loc_5 in _loc_4)
                            {
                                
                                var _loc_6:* = _loc_4[_loc_3];
                                with (_loc_4[_loc_3])
                                {
                                    if (@label == "General Info")
                                    {
                                        _loc_2[_loc_3] = _loc_5;
                                    }
                                }
                            }
                            containerShell.newShell("generalInfoShell", _loc_2, 0);
                            break;
                        }
                        case "employment":
                        {
                            switch(pathNames[2])
                            {
                                case "new-york":
                                {
                                    if (pathNames[4] != undefined)
                                    {
                                        containerShell.newJobShell(pathNames[4]);
                                    }
                                    else if (pathNames[3] != undefined)
                                    {
                                        var _loc_3:int = 0;
                                        var _loc_6:int = 0;
                                        var _loc_7:* = myXML.nav.contact.tier0;
                                        var _loc_5:* = new XMLList("");
                                        for each (_loc_8 in _loc_7)
                                        {
                                            
                                            var _loc_9:* = _loc_7[_loc_6];
                                            with (_loc_7[_loc_6])
                                            {
                                                if (@label == "Employment")
                                                {
                                                    _loc_5[_loc_6] = _loc_8;
                                                }
                                            }
                                        }
                                        var _loc_4:* = _loc_5.tier1;
                                        var _loc_2:* = new XMLList("");
                                        for each (_loc_5 in _loc_4)
                                        {
                                            
                                            var _loc_6:* = _loc_4[_loc_3];
                                            with (_loc_4[_loc_3])
                                            {
                                                if (@label == "New York")
                                                {
                                                    _loc_2[_loc_3] = _loc_5;
                                                }
                                            }
                                        }
                                        containerShell.newShell("jobsIndexShell", _loc_2, pathNames[3]);
                                    }
                                    break;
                                }
                                case "los-angeles":
                                {
                                    if (pathNames[4] != undefined)
                                    {
                                        containerShell.newJobShell(pathNames[4]);
                                    }
                                    else if (pathNames[3] != undefined)
                                    {
                                        var _loc_3:int = 0;
                                        var _loc_6:int = 0;
                                        var _loc_7:* = myXML.nav.contact.tier0;
                                        var _loc_5:* = new XMLList("");
                                        for each (_loc_8 in _loc_7)
                                        {
                                            
                                            var _loc_9:* = _loc_7[_loc_6];
                                            with (_loc_7[_loc_6])
                                            {
                                                if (@label == "Employment")
                                                {
                                                    _loc_5[_loc_6] = _loc_8;
                                                }
                                            }
                                        }
                                        var _loc_4:* = _loc_5.tier1;
                                        var _loc_2:* = new XMLList("");
                                        for each (_loc_5 in _loc_4)
                                        {
                                            
                                            var _loc_6:* = _loc_4[_loc_3];
                                            with (_loc_4[_loc_3])
                                            {
                                                if (@label == "Los Angeles")
                                                {
                                                    _loc_2[_loc_3] = _loc_5;
                                                }
                                            }
                                        }
                                        containerShell.newShell("jobsIndexShell", _loc_2, pathNames[3]);
                                    }
                                    break;
                                }
                                default:
                                {
                                    break;
                                }
                            }
                            break;
                        }
                        default:
                        {
                            break;
                        }
                    }
                    break;
                }
                case "news":
                {
                    menuShell.hRule1On();
                    containerShell.newShell("newsShell", myXML.nav.news.item, pathNames[1]);
                    pathNamesClone = [];
                    break;
                }
                case "bookmarks":
                {
                    menuShell.hRule1On();
                    pathNamesClone = [];
                    switch(pathNames[1])
                    {
                        case "browse":
                        {
                            if (myBookmarksID != pathNames[2])
                            {
                                myBookmarksID = pathNames[2];
                            }
                            containerShell.newShell("bookmarksBrowse", null, 0);
                            break;
                        }
                        case "share":
                        {
                            containerShell.newShell("bookmarksSend", null, 0);
                            break;
                        }
                        case "clear":
                        {
                            containerShell.newShell("bookmarksClear", null, 0);
                            break;
                        }
                        case "create-new":
                        {
                            containerShell.newShell("bookmarksNew", null, 0);
                            break;
                        }
                        case "help":
                        {
                            containerShell.newShell("bookmarksHelp", null, 0);
                            break;
                        }
                        default:
                        {
                            break;
                        }
                    }
                    break;
                }
                case "search":
                {
                    menuShell.hRule1On();
                    pathNamesClone = [];
                    containerShell.newSearch();
                    break;
                }
                default:
                {
                    tracer.text = "DEFAULT";
                    if (firstTime == false)
                    {
                    }
                    else
                    {
                        menuShell.hRule1Off();
                        menuShell.autoSwitch(6);
                        containerShell.newShell("homeShell", myXML.home.quotes.quote, 0);
                    }
                    break;
                }
            }
            firstTime = true;
            return;
        }

        function clearComplete(event:Event) : void
        {
            var _loc_2:URLVariables = null;
            _loc_2 = new URLVariables(event.target.data);
            menuShell.navArray[4][1].updateField("Bookmarks");
            return;
        }

        function toUppercase(param1:String) : String
        {
            var _loc_2:String = null;
            var _loc_3:* = undefined;
            _loc_2 = "";
            _loc_3 = 0;
            while (_loc_3 < param1.length)
            {
                
                if (param1.charAt(_loc_3) == "-")
                {
                    _loc_2 = _loc_2 + " ";
                }
                else if (_loc_3 == 0 || param1.charAt((_loc_3 - 1)) == "-")
                {
                    _loc_2 = _loc_2 + param1.charAt(_loc_3).toUpperCase();
                }
                else
                {
                    _loc_2 = _loc_2 + param1.charAt(_loc_3).toLowerCase();
                }
                _loc_3 = _loc_3 + 1;
            }
            return _loc_2;
        }

        public function getBookmarksID() : void
        {
            myBookmarksID = String(sharedLb.data.myID);
            loadBookmarks(myBookmarksID);
            return;
        }

        public function createComplete(event:Event) : void
        {
            var _loc_2:URLVariables = null;
            var _loc_3:String = null;
            _loc_2 = new URLVariables(event.target.data);
            myBookmarksID = _loc_2.lightboxId;
            sharedLb.data.myID = myBookmarksID;
            _loc_3 = sharedLb.flush();
            loadBookmarks(myBookmarksID);
            return;
        }

        function toggleGrid(event:MouseEvent)
        {
            if (unitsArray[0].alpha == 1)
            {
                gridOff();
            }
            else
            {
                gridOn();
            }
            return;
        }

        function comparePathNames(param1:int) : Boolean
        {
            var _loc_2:int = 0;
            _loc_2 = 0;
            while (_loc_2 < param1)
            {
                
                if (pathNames[_loc_2] != pathNamesClone[_loc_2])
                {
                    return false;
                }
                _loc_2++;
            }
            return true;
        }

        public function closeToolTip() : void
        {
            overFullscreenIcon = false;
            toolTip.alpha = 0;
            toolTip.visible = false;
            stage.removeEventListener(Event.ENTER_FRAME, dragToolTip);
            return;
        }

        function buildGrid() : void
        {
            var _loc_1:* = undefined;
            var _loc_2:int = 0;
            var _loc_3:int = 0;
            unitsArray = new Array();
            _loc_1 = 0;
            _loc_2 = 0;
            while (_loc_2 < unitRows)
            {
                
                _loc_3 = 0;
                while (_loc_3 < unitCols)
                {
                    
                    unit = new Unit();
                    unit.name = "unit" + _loc_1;
                    unitsArray.push(unit);
                    unit.alpha = 0;
                    addChild(unit);
                    _loc_1 = _loc_1 + 1;
                    _loc_3++;
                }
                _loc_2++;
            }
            return;
        }

        public function bookmarkLightbox() : void
        {
            var _loc_1:String = null;
            var _loc_2:URLRequest = null;
            _loc_1 = path + "lightbox_support/saveLightboxURL.php?lightbox_id=" + myBookmarksID;
            _loc_2 = new URLRequest(_loc_1);
            navigateToURL(_loc_2, "_self");
            return;
        }

        public function updateAddress(param1:String)
        {
            SWFAddress.setValue(param1);
            return;
        }

        function siteInit(event:FadeOutEvent) : void
        {
            removeChild(introShell);
            introShell.removeEventListener(FadeOutEvent.FADEOUT_COMPLETE, siteInit);
            introShell = null;
            menuShell = new MenuShell(this, fadeSpeed, true);
            menuShell.alpha = 0;
            addChild(menuShell);
            menuArray = new Array();
            doResize();
            menuShell.blendMode = BlendMode.LAYER;
            containerShell = new ContainerShell(this, fadeSpeed);
            containerShell.alpha = 0;
            addChild(containerShell);
            doResize();
            setTimeout(homeFade, 200);
            menuShell.hRule1Off();
            menuShell.autoSwitch(6);
            containerShell.newShell("homeShell", myXML.home.quotes.quote, 0);
            globalIcons = new GlobalIcons(this, fadeSpeed);
            globalIcons.alpha = 0;
            addChild(globalIcons);
            doResize();
            TweenMax.to(globalIcons, fadeSpeed, {alpha:1, overwrite:true});
            backBtn = new BackBtn(this, fadeSpeed);
            backBtn.buttonMode = true;
            backBtn.mouseChildren = true;
            backBtn.x = 10;
            backBtn.y = 9;
            backBtn.visible = false;
            addChild(backBtn);
            doResize();
            return;
        }

        function turnOffHomeShell() : void
        {
            if (homeShell != null)
            {
                removeChild(homeShell);
                homeShell = null;
                menuShell.hRule1Off();
                menuShell.hRule2On();
                menuShell.hRule3Off();
            }
            return;
        }

        function addComplete(event:Event) : void
        {
            var _loc_2:URLVariables = null;
            _loc_2 = new URLVariables(event.target.data);
            return;
        }

        function buildLocalBookmarksXML()
        {
            return;
        }

        public function updateBookmark() : void
        {
            if (menuShell != null)
            {
                menuShell.updateBookmark();
            }
            return;
        }

        function removeFromLocalXML(param1, param2) : void
        {
            var _loc_3:int = 0;
            if (param2 != null)
            {
                _loc_3 = 0;
                while (_loc_3 < localImagesXML.image.length())
                {
                    
                    if (localImagesXML.image[_loc_3].@id == param2)
                    {
                        delete localImagesXML.image[_loc_3];
                        break;
                    }
                    _loc_3++;
                }
            }
            else
            {
                _loc_3 = 0;
                while (_loc_3 < localPagesXML.page.length())
                {
                    
                    if (localPagesXML.page[_loc_3].@id == param1)
                    {
                        delete localPagesXML.page[_loc_3];
                        break;
                    }
                    _loc_3++;
                }
            }
            updateNavCount();
            return;
        }

        public function reorderBookmarks(param1, param2) : void
        {
            var _loc_3:String = null;
            var _loc_4:URLRequest = null;
            var _loc_5:URLLoader = null;
            _loc_3 = path + "lightbox_support/reorderLightbox.php?lightbox_id=" + myBookmarksID + "&" + param1 + "=" + param2;
            _loc_4 = new URLRequest(_loc_3);
            _loc_4.method = URLRequestMethod.POST;
            _loc_5 = new URLLoader();
            _loc_5.dataFormat = URLLoaderDataFormat.TEXT;
            _loc_5.addEventListener(Event.COMPLETE, reorderComplete, false, 0, true);
            _loc_5.addEventListener(IOErrorEvent.IO_ERROR, sendIOError, false, 0, true);
            _loc_5.load(_loc_4);
            return;
        }

        public function showToolTipNoDelay() : void
        {
            addChild(toolTip);
            toolTip.visible = true;
            TweenMax.to(toolTip, fadeSpeed, {alpha:1, delay:0.25, overwrite:true});
            stage.addEventListener(Event.ENTER_FRAME, dragToolTip);
            return;
        }

        public function doResize()
        {
            resizeGrid();
            if (menuShell != null)
            {
                menuShell.x = gridX;
                menuShell.y = gridY;
            }
            if (homeShell != null)
            {
                homeShell.x = gridX;
                homeShell.y = gridY;
            }
            if (globalIcons != null)
            {
                globalIcons.x = Math.round(stage.stageWidth - 27);
                globalIcons.y = 9;
            }
            if (loaderbar != null)
            {
                loaderbar.x = Math.round(gridX + 4 * (unitW + gutterW));
                loaderbar.y = Math.round(gridY + headerH + 3 * unitH + 2 * gutterH);
                loaderbar.width = Math.round(4 * unitW + 3 * gutterW);
                loaderbar.height = 1;
            }
            if (stage.displayState == StageDisplayState.FULL_SCREEN)
            {
                if (backBtn != null)
                {
                    backBtn.visible = true;
                }
            }
            else if (backBtn != null)
            {
                backBtn.visible = false;
            }
            return;
        }

        function clonePathNames()
        {
            var _loc_1:int = 0;
            pathNamesClone = [];
            _loc_1 = 0;
            while (_loc_1 < pathNames.length)
            {
                
                pathNamesClone.push(pathNames[_loc_1]);
                _loc_1++;
            }
            return;
        }

        public function removeFromBookmarks(param1, param2) : void
        {
            var _loc_3:String = null;
            var _loc_4:URLRequest = null;
            var _loc_5:URLLoader = null;
            if (param2 != null && localImagesXML.image.@id.contains(param2) == true || param2 == null && localPagesXML.page.@id.contains(param1) == true)
            {
                if (param2 != null)
                {
                    _loc_3 = path + "lightbox_support/removeFromLightbox.php?lightbox_id=" + myBookmarksID + "&rmp_id=" + param1 + "&media_id=" + param2;
                }
                else
                {
                    _loc_3 = path + "lightbox_support/removeFromLightbox.php?lightbox_id=" + myBookmarksID + "&rmp_id=" + param1;
                }
                _loc_4 = new URLRequest(_loc_3);
                _loc_4.method = URLRequestMethod.POST;
                _loc_5 = new URLLoader();
                _loc_5.dataFormat = URLLoaderDataFormat.TEXT;
                _loc_5.addEventListener(Event.COMPLETE, removeComplete, false, 0, true);
                _loc_5.addEventListener(IOErrorEvent.IO_ERROR, sendIOError, false, 0, true);
                _loc_5.load(_loc_4);
                removeFromLocalXML(param1, param2);
            }
            return;
        }

        function onResizer(event:Event) : void
        {
            doResize();
            return;
        }

        function getIDComplete(event:Event) : void
        {
            var _loc_2:URLVariables = null;
            _loc_2 = new URLVariables(event.target.data);
            currXMLID = _loc_2.version;
            xmlLoad();
            return;
        }

        function reorderComplete(event:Event) : void
        {
            var _loc_2:URLVariables = null;
            _loc_2 = new URLVariables(event.target.data);
            return;
        }

        function xmlProgress(event:XMLProgressEvent) : void
        {
            loaderbar.tweenTo(loaderbar.bgSprite.width * event.percent, fadeSpeed);
            return;
        }

        public function updateMenuArray(param1:String, param2:String) : void
        {
            switch(param1)
            {
                case "tier0":
                {
                    pathNames.length = 2;
                    pathNames[1] = toLowercase(param2);
                    break;
                }
                case "tier1":
                {
                    pathNames.length = 3;
                    pathNames[2] = toLowercase(param2);
                    break;
                }
                case "tier2":
                {
                    pathNames.length = 4;
                    pathNames[3] = toLowercase(param2);
                    break;
                }
                case "tier3":
                {
                    pathNames.length = 5;
                    pathNames[4] = toLowercase(param2);
                    break;
                }
                case "news":
                {
                    pathNames.length = 1;
                    pathNames[0] = toLowercase(param2);
                    break;
                }
                default:
                {
                    break;
                }
            }
            return;
        }

        public function downloadPDF(param1:String) : void
        {
            var _loc_2:String = null;
            var _loc_3:URLRequest = null;
            _loc_2 = param1;
            _loc_3 = new URLRequest(path + param1);
            fileReference.download(_loc_3, param1.substring(9));
            trace("DOWNLOAD IMAGE " + param1);
            return;
        }

        function toLowercase(param1:String) : String
        {
            var _loc_2:String = null;
            var _loc_3:* = undefined;
            _loc_2 = "";
            _loc_3 = 0;
            while (_loc_3 < param1.length)
            {
                
                if (param1.charAt(_loc_3) == " ")
                {
                    _loc_2 = _loc_2 + "-";
                }
                else
                {
                    _loc_2 = _loc_2 + param1.charAt(_loc_3).toLowerCase();
                }
                _loc_3 = _loc_3 + 1;
            }
            return _loc_2;
        }

        public function createNewBookmarks() : void
        {
            var _loc_1:String = null;
            var _loc_2:URLVariables = null;
            var _loc_3:URLRequest = null;
            var _loc_4:URLLoader = null;
            _loc_1 = path + "lightbox_support/createNewLightbox.php";
            _loc_2 = new URLVariables();
            _loc_3 = new URLRequest(_loc_1);
            _loc_3.method = URLRequestMethod.POST;
            _loc_4 = new URLLoader();
            _loc_4.dataFormat = URLLoaderDataFormat.TEXT;
            _loc_4.addEventListener(Event.COMPLETE, createComplete, false, 0, true);
            _loc_4.addEventListener(IOErrorEvent.IO_ERROR, sendIOError, false, 0, true);
            _loc_4.load(_loc_3);
            return;
        }

        function updateNavCount() : void
        {
            var _loc_1:* = undefined;
            var _loc_2:* = undefined;
            var _loc_3:String = null;
            _loc_1 = localImagesXML.image.length();
            _loc_2 = localPagesXML.page.length();
            if (_loc_1 > 0 || _loc_2 > 0)
            {
                _loc_3 = "Bookmarks " + String(localImagesXML.image.length() + localPagesXML.page.length());
            }
            else
            {
                _loc_3 = "Bookmarks";
            }
            menuShell.navArray[4][1].updateField(_loc_3);
            return;
        }

        function getCurrBookmarkID()
        {
            if (sharedLb.data.myID == undefined)
            {
                createNewBookmarks();
            }
            else
            {
                getBookmarksID();
            }
            return;
        }

        function getCurrXMLID()
        {
            var _loc_1:String = null;
            var _loc_2:URLRequest = null;
            var _loc_3:URLLoader = null;
            _loc_1 = path + "flash_support/getXMLVersion.php";
            _loc_2 = new URLRequest(_loc_1);
            _loc_2.method = URLRequestMethod.POST;
            _loc_3 = new URLLoader();
            _loc_3.dataFormat = URLLoaderDataFormat.TEXT;
            _loc_3.addEventListener(Event.COMPLETE, getIDComplete);
            _loc_3.addEventListener(IOErrorEvent.IO_ERROR, getIDFail);
            _loc_3.load(_loc_2);
            return;
        }

        function xmlLoad() : void
        {
            loaderbar = new LoaderBar(this, 327, 9, 15592941, 16724736);
            loaderbar.alpha = 1;
            addChild(loaderbar);
            doResize();
            TweenMax.to(loaderbar, fadeSpeed, {alpha:1, overwrite:true});
            xmlLoader = new XMLLoader();
            xmlLoader.addEventListener(XMLProgressEvent.PROGRESS, xmlProgress, false, 0, true);
            xmlLoader.addEventListener(XMLInitEvent.INIT_COMPLETE, xmlInit, false, 0, true);
            xmlLoader.load(path + "flash_support/rmp_parent_" + currXMLID + ".xml");
            return;
        }

        function getIDFail(event:IOErrorEvent) : void
        {
            return;
        }

        private function handleSWFAddressChange(event:SWFAddressEvent) : void
        {
            pathNames = event.pathNames;
            pushSWFAddressChange();
            return;
        }

        public function loadBookmarks(param1:String) : void
        {
            myBookmarksID = param1;
            bookmarksXMLLoader = new URLLoader();
            bookmarksXMLLoader.addEventListener(Event.COMPLETE, initBookmarksXML);
            bookmarksXMLLoader.load(new URLRequest(path + "lightbox_support/load_lightbox_xml.php?lightbox_id=" + myBookmarksID));
            return;
        }

        public function openFullscreen() : void
        {
            stage.displayState = StageDisplayState.FULL_SCREEN;
            doResize();
            return;
        }

        function gridOn() : void
        {
            var _loc_1:int = 0;
            _loc_1 = 0;
            while (_loc_1 < unitsArray.length)
            {
                
                unitsArray[_loc_1].alpha = 1;
                _loc_1++;
            }
            return;
        }

        function addToLocalXML(param1, param2) : void
        {
            if (param2 != null)
            {
                if (localImagesXML.length() == undefined)
                {
                }
                localImagesXML.images = localImagesXML.images + <image/>;
                localImagesXML.image[(localImagesXML.image.length() - 1)].@id = param2;
                localImagesXML.image[(localImagesXML.image.length() - 1)].@parentId = param1;
            }
            else
            {
                localPagesXML.pages = localPagesXML.pages + <page/>;
                localPagesXML.page[(localPagesXML.page.length() - 1)].@id = param1;
            }
            updateNavCount();
            return;
        }

        function xmlInit(event:XMLInitEvent) : void
        {
            var e:* = event;
            loaderbar.finishTween(fadeSpeed / 5);
            myXML = e.myXML;
            myXML.nav.appendChild(<bookmarks><tier0 label="Browse" menu="bookmarksMenu"/><tier0 label="Share" menu="bookmarksMenu"/><tier0 label="Clear" menu="bookmarksMenu"/><tier0 label="Create New" menu="bookmarksMenu"/><tier0 label="Help" menu="bookmarksMenu"/></bookmarks>);
            TweenMax.to(loaderbar, fadeSpeed, {alpha:0, overwrite:true, onComplete:function ()
            {
                initSWFAddress();
                return;
            }
            });
            return;
        }

        public function showBackToolTip() : void
        {
            overBackBtn = true;
            addChild(toolTip);
            toolTip.visible = true;
            TweenMax.to(toolTip, fadeSpeed, {alpha:1, delay:0.25, overwrite:true});
            stage.addEventListener(Event.ENTER_FRAME, dragToolTip);
            return;
        }

        public function closeFullscreen() : void
        {
            stage.displayState = StageDisplayState.NORMAL;
            doResize();
            return;
        }

        function removeComplete(event:Event) : void
        {
            var _loc_2:URLVariables = null;
            _loc_2 = new URLVariables(event.target.data);
            return;
        }

        public function changeToolTipText(param1:String)
        {
            toolTip.changeText(param1);
            return;
        }

        public function closeToolTipWithDelay() : void
        {
            TweenMax.to(toolTip, 0.1, {alpha:0, overwrite:true, delay:0.01, onComplete:function ()
            {
                overFullscreenIcon = false;
                overBackBtn = false;
                toolTip.visible = false;
                stage.removeEventListener(Event.ENTER_FRAME, dragToolTip);
                return;
            }
            });
            return;
        }

        public function closeBackToolTip() : void
        {
            TweenMax.to(toolTip, 0.1, {alpha:0, overwrite:true, delay:0.01, onComplete:function ()
            {
                overFullscreenIcon = false;
                overBackBtn = false;
                toolTip.visible = false;
                stage.removeEventListener(Event.ENTER_FRAME, dragToolTip);
                return;
            }
            });
            return;
        }

        public function showFSToolTip() : void
        {
            overFullscreenIcon = true;
            addChild(toolTip);
            toolTip.visible = true;
            TweenMax.to(toolTip, fadeSpeed, {alpha:1, delay:0.25, overwrite:true});
            stage.addEventListener(Event.ENTER_FRAME, dragToolTip);
            return;
        }

        function sendIOError(event:IOErrorEvent) : void
        {
            return;
        }

    }
}
